Files
ServerKit/serverkit-backend.service
T
Juan Denis f23384889b Bind Gunicorn to all interfaces in service file
Changed the Gunicorn bind address from 127.0.0.1 to 0.0.0.0 in serverkit-backend.service to allow external connections. This enables access to the backend from outside the local machine.
2026-01-18 21:31:47 -05:00

31 lines
858 B
Desktop File

[Unit]
Description=ServerKit Backend API
After=network.target docker.service
Wants=docker.service
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/serverkit/backend
Environment="PATH=/opt/serverkit/venv/bin:/usr/local/bin:/usr/bin:/bin"
Environment="FLASK_ENV=production"
EnvironmentFile=/opt/serverkit/.env
ExecStart=/opt/serverkit/venv/bin/gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 -b 0.0.0.0:5000 --timeout 120 --access-logfile /var/log/serverkit/access.log --error-logfile /var/log/serverkit/error.log run:app
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=5
# Security settings (while still allowing system management)
NoNewPrivileges=no
ProtectSystem=no
ProtectHome=no
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=serverkit
[Install]
WantedBy=multi-user.target