update deploy scripts
This commit is contained in:
@@ -164,6 +164,9 @@ for DIR in /opt/etc-prs "$APP_DIR" "$DATA_DIR" "$LOG_DIR" "$BACKUP_DIR"; do
|
||||
done
|
||||
|
||||
chown -R "${APP_USER}:${APP_USER}" /opt/etc-prs "$DATA_DIR" "$LOG_DIR" "$BACKUP_DIR"
|
||||
# SQLite WAL mode needs the process to create/write -wal and -shm sidecar files.
|
||||
# Since PM2 runs as root, the data dir and DB files must be writable by root.
|
||||
chmod 777 "$DATA_DIR"
|
||||
success "Directories created and ownership set"
|
||||
|
||||
# ── Step 3: Clone from Gitea ──────────────────────────────────────────────────
|
||||
@@ -224,9 +227,13 @@ module.exports = {
|
||||
script: '${APP_DIR}/build/index.js',
|
||||
cwd: '${APP_DIR}',
|
||||
env: {
|
||||
NODE_ENV: 'production',
|
||||
PORT: '3000',
|
||||
HOST: '127.0.0.1',
|
||||
NODE_ENV: 'production',
|
||||
PORT: '3000',
|
||||
HOST: '127.0.0.1',
|
||||
DATABASE_URL: '${DATA_DIR}/personalities.db',
|
||||
RATE_LIMIT_PUBLISH: '${RATE_PUBLISH}',
|
||||
RATE_LIMIT_READ: '${RATE_READ}',
|
||||
PUBLIC_BASE_URL: 'https://${DOMAIN}',
|
||||
},
|
||||
error_file: '${LOG_DIR}/error.log',
|
||||
out_file: '${LOG_DIR}/out.log',
|
||||
|
||||
Reference in New Issue
Block a user