28 lines
602 B
SYSTEMD
28 lines
602 B
SYSTEMD
|
|
[Unit]
|
||
|
|
Description=Oltalama Frontend Service
|
||
|
|
Documentation=https://github.com/yourusername/oltalama
|
||
|
|
After=network.target oltalama-backend.service
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=simple
|
||
|
|
User=www-data
|
||
|
|
Group=www-data
|
||
|
|
WorkingDirectory=/opt/oltalama/frontend
|
||
|
|
Environment=NODE_ENV=production
|
||
|
|
Environment=PORT=4173
|
||
|
|
ExecStart=/usr/bin/npm run preview
|
||
|
|
Restart=always
|
||
|
|
RestartSec=10
|
||
|
|
StandardOutput=append:/var/log/oltalama/frontend.log
|
||
|
|
StandardError=append:/var/log/oltalama/frontend-error.log
|
||
|
|
|
||
|
|
# Security settings
|
||
|
|
NoNewPrivileges=true
|
||
|
|
PrivateTmp=true
|
||
|
|
ProtectSystem=strict
|
||
|
|
ProtectHome=true
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=multi-user.target
|
||
|
|
|