erp-bridge.service 614 B

123456789101112131415161718192021222324
  1. # Systemd service — ERP FastAPI Bridge
  2. # Place at: /etc/systemd/system/erp-bridge.service
  3. # Enable: sudo systemctl daemon-reload && sudo systemctl enable --now erp-bridge
  4. [Unit]
  5. Description=Homelegance ERP FastAPI Bridge
  6. After=network.target
  7. [Service]
  8. Type=simple
  9. User=apache
  10. Group=apache
  11. WorkingDirectory=/redant/web/erp-bridge
  12. EnvironmentFile=/redant/web/erp-bridge/.env
  13. ExecStart=/usr/bin/python3.11 -m uvicorn main:app --host 127.0.0.1 --port 8080 --workers 2
  14. Restart=on-failure
  15. RestartSec=5
  16. StandardOutput=journal
  17. StandardError=journal
  18. SyslogIdentifier=erp-bridge
  19. [Install]
  20. WantedBy=multi-user.target