[Unit]
Description=AI Agent Admin FastAPI
After=network.target

[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/ai-agent-admin/current/backend-fastapi
Environment=ENV=prod
Environment=PYTHONPATH=/opt/ai-agent-admin/current/backend-fastapi
Environment=APP_HOST=127.0.0.1
Environment=APP_PORT=8001
EnvironmentFile=/opt/ai-agent-admin/current/backend-fastapi/env/prod.env
ExecStart=/opt/ai-agent-admin/current/backend-fastapi/.venv/bin/python -m uvicorn main:app --host 127.0.0.1 --port 8001 --workers 4
Restart=always
RestartSec=5
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target
