diff --git a/goofyfowlfoundation.service b/goofyfowlfoundation.service new file mode 100644 index 0000000..7f9602a --- /dev/null +++ b/goofyfowlfoundation.service @@ -0,0 +1,23 @@ +[Unit] +Description=Goofy Fowl Foundation web server +After=network.target + +[Service] +Type=simple +# Update these two to match your deployment +User=nick +WorkingDirectory=/opt/goofyfowlfoundation + +# Build the app before each start (skip this if you build separately) +#ExecStartPre=/usr/bin/npm ci +#ExecStartPre=/usr/bin/npm run build +ExecStart=/usr/bin/node server.js + +Environment=NODE_ENV=production +Environment=PORT=3001 + +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target