zetikettes/README.md

65 lines
1.2 KiB
Markdown
Raw Normal View History

2022-07-12 10:23:31 +00:00
zetikettes
==========
ouaich.
Initial setup
-------------
```
docker build -t zetikettes .
2025-02-11 14:46:28 +00:00
sudo mkdir -p /etc/docker/compose/zetikettes
sudo cp docker-compose.yml /etc/docker/compose/zetikettes/
sudo systemctl enable --now docker-compose@zetikettes
2022-07-12 10:23:31 +00:00
```
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
----
```
2023-07-03 14:56:58 +00:00
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.
2022-07-12 10:23:31 +00:00
Run
---
```
2025-02-11 14:46:28 +00:00
docker-compose up
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
1. add the newtikette
1. still no need to restart the container (magic!)
2022-07-12 10:23:31 +00:00
2. profit.