No description
Find a file
2024-12-04 22:02:11 +01:00
epson
resources Add CYBER font 2024-11-28 00:59:36 +01:00
templates Add CYBER font 2024-11-28 00:59:36 +01:00
.gitignore
.gitmodules
app.py remove redirects to request.url's cause those cause unpredictable 2024-12-04 21:55:30 +01:00
config.py
file_handler.py
fonts.py Add CYBER font 2024-11-28 00:59:36 +01:00
gen_image.py Add CYBER font 2024-11-28 00:59:36 +01:00
label_printer.service
LICENSE
Makefile
print.py Undo commenting out library_bridge.so 2024-11-28 01:07:52 +01:00
process_image.py
README.md Remove part of the nginx setup (in README.md) to prevent redirect to request.url issues 2024-12-04 22:02:11 +01:00
requirements.txt

Setup

On a raspberry pi:

user: pi
password: itoldyoualready

Install

from the home directory:

git clone https://code.techinc.nl/emilevs/label_printer.git
sudo apt install python3-flask
sudo apt install golang

(there might be more dependencies, I wasn't starting from a clean raspbian install when testing this)

navigate into the label_printer directory

run make to build the go library

cp label_printer.service to /etc/systemd/system/

sudo systemctl enable label_printer
sudo systemctl start label_printer

The interface will now be running on localhost:5000, which we need to route to the outside world in the next step

Setup the nginx

sudo apt install nginx edit /etx/nginx/sites-available/default and change the contents of:

location / { }

to:

location / {
    proxy_pass http://127.0.0.1:5000;
}
sudo systemctl restart nginx

Setup static ip on the pi

edit /etc/dhcpcd.conf and add:

static ip_address=10.209.10.2/24
static routers=10.209.10.254
static domain_name_servers=10.209.10.255