27 lines
836 B
Desktop File
27 lines
836 B
Desktop File
[Unit]
|
|
Description=EUSRR frontend (%i slot)
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=deploy
|
|
Group=www-data
|
|
WorkingDirectory=/srv/eusrr-slots/%i/frontend
|
|
EnvironmentFile=/etc/eusrr/slots/%i.env
|
|
Environment=NODE_ENV=production
|
|
ExecStartPre=/bin/sh -c 'cp -r /srv/eusrr-slots/%i/frontend/public /srv/eusrr-slots/%i/frontend/.next/standalone/ 2>/dev/null || true'
|
|
ExecStartPre=/bin/sh -c 'cp -r /srv/eusrr-slots/%i/frontend/.next/static /srv/eusrr-slots/%i/frontend/.next/standalone/.next/ 2>/dev/null || true'
|
|
ExecStart=/usr/bin/node /srv/eusrr-slots/%i/frontend/.next/standalone/server.js
|
|
Restart=always
|
|
RestartSec=3
|
|
TimeoutStopSec=30
|
|
SuccessExitStatus=143
|
|
NoNewPrivileges=yes
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=eusrr-frontend-%i
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|