[Unit]
Description=Church Music Database Backend (Node.js)
After=network.target postgresql.service
Wants=postgresql.service

[Service]
Type=simple
User=pts
Group=pts
WorkingDirectory=/media/pts/Website/Church_HOP_MusicData/new-site/backend
Environment="NODE_ENV=production"
Environment="PORT=8080"
ExecStart=/usr/bin/node server.js
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=church-music-backend

# Security settings
NoNewPrivileges=true
PrivateTmp=true

[Install]
WantedBy=multi-user.target
