2022-07-12 10:23:31 +00:00
|
|
|
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
|
|
|
|
|
2023-07-03 13:12:06 +00:00
|
|
|
Test
|
|
|
|
----
|
|
|
|
|
|
|
|
```
|
2023-07-03 14:56:58 +00:00
|
|
|
docker run --rm -it -v $PWD/templates:/data zetikettes /bin/bash /root/zetikettes/old/mkjam.sh
|
2023-07-03 13:12:06 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
This should produce a .pdf in `templates/`. Open it to check that
|
|
|
|
layout & fonts are correct.
|
|
|
|
|
2022-07-12 10:23:31 +00:00
|
|
|
Run
|
|
|
|
---
|
|
|
|
|
|
|
|
```
|
2023-07-03 13:12:06 +00:00
|
|
|
docker run -d --rm -p 127.0.0.1:8000:8000 -v /var/lib/zetikettes/templates:/data zetikettes
|
2022-07-12 10:23:31 +00:00
|
|
|
```
|
|
|
|
|
2023-07-03 18:01:59 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
2022-07-12 10:23:31 +00:00
|
|
|
Change available templates
|
|
|
|
--------------------------
|
|
|
|
|
2023-07-03 14:56:58 +00:00
|
|
|
1. go to /zetikettes/admin
|
2023-06-28 21:17:03 +00:00
|
|
|
1. add the newtikette
|
|
|
|
1. still no need to restart the container (magic!)
|
2022-07-12 10:23:31 +00:00
|
|
|
2. profit.
|