Initial import
This commit is contained in:
commit
ab891a315c
773 changed files with 257255 additions and 0 deletions
26
scripts/vps-post-receive.sample.sh
Normal file
26
scripts/vps-post-receive.sample.sh
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
APP_DIR="/srv/content-editor-v2/app"
|
||||
GIT_DIR="/srv/content-editor-v2/repo.git"
|
||||
CONTENT_ROOT="/srv/content-editor-v2/shared/content"
|
||||
PORT="5180"
|
||||
APP_NAME="content-editor-v2"
|
||||
|
||||
echo "[deploy] checkout"
|
||||
git --work-tree="$APP_DIR" --git-dir="$GIT_DIR" checkout -f
|
||||
|
||||
cd "$APP_DIR"
|
||||
|
||||
echo "[deploy] install"
|
||||
npm install
|
||||
|
||||
echo "[deploy] validate"
|
||||
npm run validate:content
|
||||
|
||||
echo "[deploy] build"
|
||||
npm run build
|
||||
|
||||
echo "[deploy] restart"
|
||||
CONTENT_ROOT="$CONTENT_ROOT" PORT="$PORT" pm2 restart "$APP_NAME" || \
|
||||
CONTENT_ROOT="$CONTENT_ROOT" PORT="$PORT" pm2 start server.js --name "$APP_NAME"
|
||||
Loading…
Add table
Add a link
Reference in a new issue