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
|
done
|
||||||
|
|
||||||
chown -R "${APP_USER}:${APP_USER}" /opt/etc-prs "$DATA_DIR" "$LOG_DIR" "$BACKUP_DIR"
|
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"
|
success "Directories created and ownership set"
|
||||||
|
|
||||||
# ── Step 3: Clone from Gitea ──────────────────────────────────────────────────
|
# ── Step 3: Clone from Gitea ──────────────────────────────────────────────────
|
||||||
@@ -227,6 +230,10 @@ module.exports = {
|
|||||||
NODE_ENV: 'production',
|
NODE_ENV: 'production',
|
||||||
PORT: '3000',
|
PORT: '3000',
|
||||||
HOST: '127.0.0.1',
|
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',
|
error_file: '${LOG_DIR}/error.log',
|
||||||
out_file: '${LOG_DIR}/out.log',
|
out_file: '${LOG_DIR}/out.log',
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ for DIR in /opt/etc-prs "$APP_DIR" "$DATA_DIR" "$LOG_DIR" "$BACKUP_DIR"; do
|
|||||||
mkdir -p "$DIR"
|
mkdir -p "$DIR"
|
||||||
done
|
done
|
||||||
chown -R "${APP_USER}:${APP_USER}" /opt/etc-prs "$DATA_DIR" "$LOG_DIR" "$BACKUP_DIR"
|
chown -R "${APP_USER}:${APP_USER}" /opt/etc-prs "$DATA_DIR" "$LOG_DIR" "$BACKUP_DIR"
|
||||||
|
chmod 777 "$DATA_DIR"
|
||||||
success "Directories OK"
|
success "Directories OK"
|
||||||
|
|
||||||
# ── Step 3: Clone / pull repo ─────────────────────────────────────────────────
|
# ── Step 3: Clone / pull repo ─────────────────────────────────────────────────
|
||||||
@@ -276,6 +277,10 @@ module.exports = {
|
|||||||
NODE_ENV: 'production',
|
NODE_ENV: 'production',
|
||||||
PORT: '3000',
|
PORT: '3000',
|
||||||
HOST: '127.0.0.1',
|
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',
|
error_file: '${LOG_DIR}/error.log',
|
||||||
out_file: '${LOG_DIR}/out.log',
|
out_file: '${LOG_DIR}/out.log',
|
||||||
|
|||||||
Reference in New Issue
Block a user