# /etc/systemd/system/koru-worker.service # Worker KORU : traite les signaux TradingView enregistrés en base et passe les ordres Bitunix. # # sudo cp deploy/koru-worker.service /etc/systemd/system/ # sudo systemctl daemon-reload # sudo systemctl enable --now koru-worker # journalctl -u koru-worker -f [Unit] Description=KORU worker (TradingView -> Bitunix Futures) After=network-online.target mysql.service Wants=network-online.target [Service] Type=simple User=www-data Group=www-data WorkingDirectory=/var/www/koru-webhook ExecStart=/usr/bin/php8.3 /var/www/koru-webhook/bin/worker.php # Le worker s'arrête seul après WORKER_MAX_RUNTIME_SECONDS ou sur erreur : toujours relancé. Restart=always RestartSec=5 # SIGTERM : le signal en cours est terminé avant l'arrêt. KillSignal=SIGTERM TimeoutStopSec=180 # Durcissement NoNewPrivileges=true PrivateTmp=true ProtectSystem=full ProtectHome=true ReadWritePaths=/var/www/koru-webhook/var [Install] WantedBy=multi-user.target