mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-10-30 08:36:55 +09:00
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.
31 lines
858 B
Desktop File
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
|