enable dev|prod envs with simpler env vars system
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
PB_DATA=${PB_DATA_DIR:-/app/pb_data}
|
||||
# PocketBase data lives on the mounted volume (compose maps ./pb_data → /app/pb_data).
|
||||
PB_DATA=/app/pb_data
|
||||
|
||||
# Seed a platform superuser from env (idempotent — no-op if it already exists).
|
||||
# If PB_EMAIL/PB_PASSWORD aren't set, skip and rely on manual web setup.
|
||||
@@ -24,7 +25,9 @@ for i in $(seq 1 30); do
|
||||
done
|
||||
|
||||
# Start the app (frontend + proxy). The proxy auto-runs schema migration.
|
||||
PORT=${FRONTEND_PORT:-2080} node /app/frontend/build/index.js &
|
||||
PROXY_PORT=${PROXY_PORT:-3456} node /app/proxy/dist/index.js &
|
||||
# FRONTEND_PORT/PROXY_PORT are set via ENV in the Dockerfile; adapter-node
|
||||
# reads PORT, the proxy reads PROXY_PORT.
|
||||
node /app/frontend/build/index.js &
|
||||
node /app/proxy/dist/index.js &
|
||||
|
||||
nginx -g 'daemon off;'
|
||||
|
||||
Reference in New Issue
Block a user