infra/burst/systemd/subplz-worker.service (624 bytes)
1 [Unit] 2 Description=subplz-web worker on the web server 3 After=network-online.target subplz-web.service 4 Wants=network-online.target 5 6 [Service] 7 User=subplz 8 WorkingDirectory=/opt/subplz-web 9 EnvironmentFile=/opt/subplz-web/.env 10 EnvironmentFile=/etc/subplz-storage.env 11 Environment=PATH=/opt/subplz-web/.venv/bin:/usr/local/bin:/usr/bin:/bin 12 Environment=HOME=/opt/subplz-web 13 ExecStart=/opt/subplz-web/.venv/bin/python worker.py 14 # Postgres and Redis run on this machine too: if memory runs out, the kernel 15 # must stop this worker, not the database. 16 MemoryMax=2800M 17 Restart=always 18 RestartSec=10 19 20 [Install] 21 WantedBy=multi-user.target