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

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

# Security hardening
NoNewPrivileges=true
PrivateTmp=true

[Install]
WantedBy=multi-user.target
