26 lines
716 B
Desktop File
26 lines
716 B
Desktop File
[Unit]
|
|
Description=Food App (Meal Planning API)
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
User=openclaw
|
|
Group=automation
|
|
WorkingDirectory=/var/lib/food
|
|
Environment="PATH=/var/lib/food/.venv/bin:/usr/bin"
|
|
Environment="DJANGO_SETTINGS_MODULE=food_project.settings"
|
|
# Secrets/config (DJANGO_SECRET_KEY, optional DJANGO_DEBUG) live here, not in git.
|
|
# The leading '-' makes it optional so the service still starts if absent.
|
|
EnvironmentFile=-/var/lib/food/.env
|
|
ExecStart=/var/lib/food/.venv/bin/gunicorn food_project.wsgi:application \
|
|
--bind 127.0.0.1:8042 \
|
|
--workers 2 \
|
|
--timeout 30 \
|
|
--access-logfile - \
|
|
--error-logfile -
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|