Make native systemd services the recommended production path for pobsync while keeping Docker Compose available for development and optional test installs. Add web, worker, and scheduler systemd unit templates, a native environment example, an optional nginx reverse proxy template, and an installer that creates the venv, service user, env file, units, and runs migrations/static collection. Allow native deployments to configure POBSYNC_BACKUP_ROOT directly and document the new production layout and update flow.
20 lines
690 B
Desktop File
20 lines
690 B
Desktop File
[Unit]
|
|
Description=pobsync Django control panel
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=@POBSYNC_USER@
|
|
Group=@POBSYNC_GROUP@
|
|
WorkingDirectory=@POBSYNC_APP_DIR@
|
|
EnvironmentFile=@POBSYNC_ENV_FILE@
|
|
ExecStartPre=@POBSYNC_VENV_DIR@/bin/python manage.py migrate --noinput
|
|
ExecStartPre=@POBSYNC_VENV_DIR@/bin/python manage.py collectstatic --noinput --clear
|
|
ExecStart=/bin/sh -c 'exec @POBSYNC_VENV_DIR@/bin/gunicorn pobsync_server.wsgi:application --bind "${POBSYNC_WEB_BIND:-127.0.0.1:8010}" --workers "${POBSYNC_GUNICORN_WORKERS:-2}" --timeout "${POBSYNC_GUNICORN_TIMEOUT:-120}"'
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|