- Update FRONTEND_URL default from localhost:3002 to localhost:3019 (actual frontend port) - Reorder systemd service so EnvironmentFile loads before Environment overrides Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
714 B
Desktop File
30 lines
714 B
Desktop File
[Unit]
|
|
Description=Spanglish Backend API
|
|
Documentation=https://github.com/spanglish/Spanglish
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=spanglish
|
|
Group=spanglish
|
|
WorkingDirectory=/home/spanglish/Spanglish/backend
|
|
EnvironmentFile=/home/spanglish/Spanglish/backend/.env
|
|
Environment=NODE_ENV=production
|
|
Environment=PORT=3018
|
|
ExecStart=/usr/bin/node dist/index.js
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
StandardOutput=syslog
|
|
StandardError=syslog
|
|
SyslogIdentifier=spanglish-backend
|
|
|
|
# Security hardening
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=read-only
|
|
ReadWritePaths=/home/spanglish/Spanglish/backend/uploads /home/spanglish/Spanglish/backend/data
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|