backend | ||
frontend | ||
templates | ||
.gitignore | ||
Dockerfile | ||
nginx_locations | ||
README.md | ||
zetikettes.service |
zetikettes
ouaich.
Initial setup
docker build -t zetikettes .
Nginx is configured to:
- redirect /zetikettes/srv/ to localhost:8000
- redirect /zetikettes/ to /var/lib/zetikettes/static
Conf is in /etc/nginx/sites-available/default
Test
docker run --rm -it -v $PWD/templates:/data zetikettes /bin/bash /root/zetikettes/old/mkjam.sh
This should produce a .pdf in templates/
. Open it to check that
layout & fonts are correct.
Run
docker run -d --rm -p 127.0.0.1:8000:8000 -v /var/lib/zetikettes/templates:/data zetikettes
Notes for deploying
.h3 Initialize empty database
python manage.py migrate
.h3 Prepare static files
python manage.py collectstatic
The files will be in www_static/
and need to be moved to /var/lib/zetikettes/www_static
.h3 Change host settings
If not deploying on aerith.ponteilla.net
, you'll need to edit backend/zetikettes/zetikettes/settings.py
to change a couple things in there.
Change available templates
- go to /zetikettes/admin
- add the newtikette
- still no need to restart the container (magic!)
- profit.