Brings cron-worker online in production via systemd. Closes verify-api-cron.py liveness alert.
33 lines
768 B
Desktop File
33 lines
768 B
Desktop File
[Unit]
|
|
Description=Truck Wash API cron worker (long-running scheduler)
|
|
After=network-online.target php8.2-fpm.service redis.service
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=www-data
|
|
Group=www-data
|
|
WorkingDirectory=/opt/copenhagentruckwash-api/services/nginx/app
|
|
ExecStart=/usr/bin/php /opt/copenhagentruckwash-api/services/nginx/app/index.php run cron-worker
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
Restart=always
|
|
RestartSec=10
|
|
TimeoutStopSec=30
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=cron-worker
|
|
|
|
# Hardening
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=full
|
|
ProtectHome=true
|
|
ReadWritePaths=/opt/copenhagentruckwash-api/services/php/logs
|
|
|
|
# Resource limits
|
|
LimitNOFILE=65536
|
|
MemoryMax=512M
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|