Files
thrillwiki_django_no_react/scripts/systemd/thrillwiki-smart-deploy.service
pacnpal 31a1465890 Configure PostgreSQL with PostGIS support
- Updated database settings to use dj_database_url for environment-based configuration
- Added dj-database-url dependency
- Configured PostGIS backend for spatial data support
- Set default DATABASE_URL for production PostgreSQL connection
2025-08-19 18:51:33 -04:00

76 lines
2.1 KiB
Desktop File

[Unit]
Description=ThrillWiki Smart Deployment Service
Documentation=man:thrillwiki-smart-deploy(8)
After=network.target thrillwiki-deployment.service
Wants=network.target
PartOf=thrillwiki-smart-deploy.timer
[Service]
Type=oneshot
User=thrillwiki
Group=thrillwiki
WorkingDirectory=/home/thrillwiki/thrillwiki
ExecStart=/home/thrillwiki/thrillwiki/scripts/smart-deploy.sh
TimeoutStartSec=300
TimeoutStopSec=60
# Environment variables - Load from deployment configuration
EnvironmentFile=-/home/thrillwiki/thrillwiki/scripts/systemd/thrillwiki-deployment.env
Environment=PROJECT_DIR=/home/thrillwiki/thrillwiki
Environment=SERVICE_NAME=thrillwiki-smart-deploy
Environment=DEPLOYMENT_MODE=timer
Environment=LOG_DIR=/home/thrillwiki/thrillwiki/logs
Environment=PATH=/home/thrillwiki/.local/bin:/home/thrillwiki/.cargo/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/home/thrillwiki/thrillwiki
# Security settings - Inherited from main deployment service
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictSUIDSGID=true
RestrictRealtime=true
RestrictNamespaces=true
LockPersonality=true
MemoryDenyWriteExecute=false
RemoveIPC=true
# File system permissions
ReadWritePaths=/home/thrillwiki/thrillwiki
ReadWritePaths=/home/thrillwiki/thrillwiki/logs
ReadWritePaths=/home/thrillwiki/thrillwiki/media
ReadWritePaths=/home/thrillwiki/thrillwiki/staticfiles
ReadWritePaths=/home/thrillwiki/thrillwiki/uploads
ReadWritePaths=/home/thrillwiki/.cache
ReadWritePaths=/tmp
ReadOnlyPaths=/home/thrillwiki/.github-pat
ReadOnlyPaths=/home/thrillwiki/.ssh
ReadOnlyPaths=/home/thrillwiki/.local
# Resource limits
LimitNOFILE=65536
LimitNPROC=1024
MemoryMax=512M
CPUQuota=50%
TasksMax=256
# Logging configuration
StandardOutput=journal
StandardError=journal
SyslogIdentifier=thrillwiki-smart-deploy
SyslogFacility=daemon
SyslogLevel=info
SyslogLevelPrefix=true
# Capabilities
CapabilityBoundingSet=
AmbientCapabilities=
PrivateDevices=true
ProtectClock=true
ProtectHostname=true
[Install]
WantedBy=multi-user.target