[Unit]
Description=meyton-sync Target (FastAPI)
After=network.target mariadb.service mysql.service
Wants=mariadb.service mysql.service

[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/meyton-sync/target

ExecStart=/usr/bin/uvicorn target:app --host 127.0.0.1 --port 8000

Restart=on-failure
RestartSec=5

# Logs gehen nach journald (zusätzlich zur target.log)
StandardOutput=journal
StandardError=journal
SyslogIdentifier=meyton-sync-target

[Install]
WantedBy=multi-user.target
