Prod: public origin gupi.glitch.university, internal services over HTTP

CORS_ORIGIN defaults to https://gupi.${DOMAIN} (the TLS frontend served by the
proxy); the app still reaches Postgres/MinIO by their docker hostnames over
plain HTTP on the shared network. Clarify the split in .env.prod.example and
fix the deploy success URL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 23:09:43 +02:00
co-authored by Claude Opus 4.8
parent 37c9fa1ebe
commit 072e82f253
4 changed files with 19 additions and 7 deletions
+12 -5
View File
@@ -1,9 +1,13 @@
# GUPI production environment. Copy to /opt/gupi/.env.prod on the server and fill in. # GUPI production environment TEMPLATE. Copy to /opt/gupi/.env.prod on the server and
# GUPI runs ONLY its own app container; Postgres + MinIO come from the shared gu_common # fill in real values there (never commit real secrets). GUPI runs ONLY its own app
# stack (which must already be up). These values point the app at those services. # container; Postgres + MinIO come from the shared gu_common stack (must already be up).
# #
# Deploy with: ./deploy.sh # Endpoints:
# (which runs, on the server, from /opt/gupi:) # - Public (frontend, TLS via the proxy): https://gupi.glitch.university
# - Internal (app -> services, plain HTTP): docker hostnames gnommo-db / gnommo-minio
# (those hostnames live in docker-compose.prod.yml; here you only set credentials).
#
# Deploy with: ./deploy.sh (server-side it runs, from /opt/gupi:)
# docker compose -f /opt/gupi/docker-compose.prod.yml --env-file /opt/gupi/.env.prod up -d # docker compose -f /opt/gupi/docker-compose.prod.yml --env-file /opt/gupi/.env.prod up -d
# --- Shared PostgreSQL (gu_common; reachable as gnommo-db on the shared network) --- # --- Shared PostgreSQL (gu_common; reachable as gnommo-db on the shared network) ---
@@ -18,7 +22,10 @@ S3_REGION=us-east-1
OSINT_S3_BUCKET=gupi-osint OSINT_S3_BUCKET=gupi-osint
# --- App --- # --- App ---
# DOMAIN drives the default public origin (https://gupi.${DOMAIN}); override CORS_ORIGIN
# directly if the frontend is served somewhere else.
DOMAIN=glitch.university DOMAIN=glitch.university
# CORS_ORIGIN=https://gupi.glitch.university
JWT_SECRET=CHANGE_ME_LONG_RANDOM_SECRET JWT_SECRET=CHANGE_ME_LONG_RANDOM_SECRET
LEVEL_EDITING_ENABLED=false LEVEL_EDITING_ENABLED=false
MAX_DOCUMENT_BYTES=26214400 MAX_DOCUMENT_BYTES=26214400
+3
View File
@@ -1,6 +1,9 @@
node_modules/ node_modules/
dist/ dist/
.env .env
.env.prod
.env.local
.env.*.local
.DS_Store .DS_Store
*.tsbuildinfo *.tsbuildinfo
playwright-report/ playwright-report/
+1 -1
View File
@@ -98,4 +98,4 @@ for i in $(seq 1 24); do
fi fi
done done
echo "==> Done! https://osint.glitch.university" echo "==> Done! https://gupi.glitch.university"
+3 -1
View File
@@ -8,8 +8,10 @@ services:
environment: environment:
NODE_ENV: production NODE_ENV: production
PORT: 8787 PORT: 8787
# Internal: reach gu_common services by their docker hostnames over plain HTTP.
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@gnommo-db:5432/${POSTGRES_DB} DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@gnommo-db:5432/${POSTGRES_DB}
CORS_ORIGIN: https://osint.${DOMAIN} # Public: the frontend is served over TLS at gupi.glitch.university by the proxy.
CORS_ORIGIN: ${CORS_ORIGIN:-https://gupi.${DOMAIN}}
JWT_SECRET: ${JWT_SECRET} JWT_SECRET: ${JWT_SECRET}
LEVEL_EDITING_ENABLED: ${LEVEL_EDITING_ENABLED:-false} LEVEL_EDITING_ENABLED: ${LEVEL_EDITING_ENABLED:-false}
MAX_DOCUMENT_BYTES: ${MAX_DOCUMENT_BYTES:-26214400} MAX_DOCUMENT_BYTES: ${MAX_DOCUMENT_BYTES:-26214400}