Add example system config files

This commit is contained in:
Paul Mathieu 2023-08-03 18:00:27 +02:00
parent 55711d68c1
commit e8abfaf51b
2 changed files with 34 additions and 0 deletions

18
nginx_locations Normal file
View File

@ -0,0 +1,18 @@
# prod site
location /zetikettes {
alias /var/lib/zetikettes/frontend;
}
location /zetikettes/srv/static {
alias /var/lib/zetikettes/www_static;
}
location ^~ /zetikettes/srv {
proxy_pass http://127.0.0.1:8000;
proxy_set_header SCRIPT_NAME /zetikettes/srv;
proxy_set_header Host $http_host;
# generating stuff takes time
proxy_read_timeout 10m;
client_max_body_size 10M;
}

16
zetikettes.service Normal file
View File

@ -0,0 +1,16 @@
[Unit]
Description=Zetikettes backend service
After=docker.service
Requires=docker.service
[Service]
ExecStart=/usr/bin/docker run --rm --name %n \
-p 127.0.0.1:8000:8000 \
-v /var/lib/zetikettes/data:/data \
zetikettes
Restart=on-failure
ExecStartPre=-/usr/bin/docker exec %n stop
ExecStartPre=-/usr/bin/docker rm %n
[Install]
WantedBy=multi-user.target