[Unit]
Description=Tickets Backend API
Documentation=https://github.com/ai-shift/cyber-valley-tickets
After=network.target postgresql.service
Wants=postgresql.service
[Service]
Type=simple
User=tickets
Group=tickets
WorkingDirectory=/home/tickets/backend
EnvironmentFile=/etc/env/tickets.env
ExecStart=/home/tickets/.local/bin/uv run python manage.py runserver 8100
Restart=always
RestartSec=5
# Resource limits
MemoryMax=512M
CPUQuota=200%
TasksMax=256
LimitNOFILE=10000
# Security hardening
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
[Install]
WantedBy=multi-user.target