30 lines
674 B
Desktop File
30 lines
674 B
Desktop File
[Unit]
|
|
Description=Oltalama Backend Service
|
|
Documentation=https://github.com/yourusername/oltalama
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=www-data
|
|
Group=www-data
|
|
WorkingDirectory=/opt/oltalama/backend
|
|
Environment=NODE_ENV=production
|
|
Environment=PORT=3000
|
|
ExecStart=/usr/bin/node /opt/oltalama/backend/src/app.js
|
|
Restart=always
|
|
RestartSec=10
|
|
StandardOutput=append:/var/log/oltalama/backend.log
|
|
StandardError=append:/var/log/oltalama/backend-error.log
|
|
|
|
# Security settings
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/opt/oltalama/backend/database
|
|
ReadWritePaths=/var/log/oltalama
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|