From e8abfaf51b8031cd797f09e732780676a5eff9c0 Mon Sep 17 00:00:00 2001 From: Paul Mathieu Date: Thu, 3 Aug 2023 18:00:27 +0200 Subject: [PATCH] Add example system config files --- nginx_locations | 18 ++++++++++++++++++ zetikettes.service | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 nginx_locations create mode 100644 zetikettes.service diff --git a/nginx_locations b/nginx_locations new file mode 100644 index 0000000..5c8f7e5 --- /dev/null +++ b/nginx_locations @@ -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; +} diff --git a/zetikettes.service b/zetikettes.service new file mode 100644 index 0000000..8e2736e --- /dev/null +++ b/zetikettes.service @@ -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