# Systemd service — ERP FastAPI Bridge
# Place at: /etc/systemd/system/erp-bridge.service
# Enable:   sudo systemctl daemon-reload && sudo systemctl enable --now erp-bridge

[Unit]
Description=Homelegance ERP FastAPI Bridge
After=network.target

[Service]
Type=simple
User=apache
Group=apache
WorkingDirectory=/redant/web/erp-bridge
EnvironmentFile=/redant/web/erp-bridge/.env
ExecStart=/usr/bin/python3.11 -m uvicorn main:app --host 127.0.0.1 --port 8080 --workers 2
Restart=on-failure
RestartSec=5

StandardOutput=journal
StandardError=journal
SyslogIdentifier=erp-bridge

[Install]
WantedBy=multi-user.target
