2026-10-24 07:54:10 +00:00
|
|
|
[Unit]
|
2026-10-24 08:03:13 +00:00
|
|
|
Description=CRM Backend Service
|
2026-10-24 07:54:10 +00:00
|
|
|
After=network.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
User=ubuntu
|
|
|
|
|
WorkingDirectory=/home/ubuntu/crmbackend
|
|
|
|
|
EnvironmentFile=/home/ubuntu/crmbackend/.env
|
2026-10-24 08:03:13 +00:00
|
|
|
ExecStart=/home/ubuntu/crmbackend/venv/bin/gunicorn crm.wsgi:application \
|
|
|
|
|
--bind 0.0.0.0:8081 \
|
|
|
|
|
--workers 3 \
|
|
|
|
|
--access-logfile /home/ubuntu/crmbackend/logs/gunicorn-access.log \
|
|
|
|
|
--error-logfile /home/ubuntu/crmbackend/logs/gunicorn-error.log \
|
|
|
|
|
--log-level info \
|
|
|
|
|
--capture-output
|
|
|
|
|
|
2026-10-24 07:54:10 +00:00
|
|
|
Restart=always
|
2026-10-24 08:03:13 +00:00
|
|
|
RestartSec=5
|
2026-10-24 07:54:10 +00:00
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|