feat: Add basic setup for Payload CMS

This commit is contained in:
2025-02-23 13:24:05 +01:00
parent 150decaabc
commit 575a6a212f
7 changed files with 62 additions and 20 deletions
@@ -0,0 +1,14 @@
#!/bin/bash
if [ ! -e ~/payload-new ]; then
echo "No-op: source does not exist."
exit 0
fi
DATE=$(date +"%Y-%m-%dT%H:%M:%S")
supervisorctl stop payload
[ -e ~/payload ] && mv ~/payload ~/payload-old-$DATE
mv ~/payload-new ~/payload
cd ~/payload
npm install
supervisorctl start payload
@@ -0,0 +1,8 @@
[program:payload]
directory=%(ENV_HOME)s/payload
command=npm run start
autostart=true
autorestart=true
environment=NODE_ENV=production
# `startsecs` is set by Uberspace monitoring team, to prevent a broken service from looping
startsecs=30