Deploy: target /opt/gupi with its own .env.prod

Point deploy.sh at /opt/gupi (its own dir + .env.prod) so it uploads, builds
on the server, migrates, and runs `docker compose -f
/opt/gupi/docker-compose.prod.yml --env-file /opt/gupi/.env.prod up -d`.
The app-only prod stack still joins the shared network and uses gu_common's
Postgres/MinIO. Adds .env.prod.example as the fill-in template.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 22:54:18 +02:00
co-authored by Claude Opus 4.8
parent 5754fa1f55
commit 37c9fa1ebe
2 changed files with 44 additions and 4 deletions
+39
View File
@@ -0,0 +1,39 @@
# GUPI production environment. Copy to /opt/gupi/.env.prod on the server and fill in.
# GUPI runs ONLY its own app container; Postgres + MinIO come from the shared gu_common
# stack (which must already be up). These values point the app at those services.
#
# Deploy with: ./deploy.sh
# (which runs, on the server, from /opt/gupi:)
# 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) ---
POSTGRES_USER=gupi
POSTGRES_PASSWORD=CHANGE_ME
POSTGRES_DB=gupi
# --- Shared MinIO / S3 (gu_common; reachable as gnommo-minio) ---
MINIO_ROOT_USER=CHANGE_ME
MINIO_ROOT_PASSWORD=CHANGE_ME
S3_REGION=us-east-1
OSINT_S3_BUCKET=gupi-osint
# --- App ---
DOMAIN=glitch.university
JWT_SECRET=CHANGE_ME_LONG_RANDOM_SECRET
LEVEL_EDITING_ENABLED=false
MAX_DOCUMENT_BYTES=26214400
# --- OCR (evidence text extraction) ---
OCR_ENABLED=true
OCR_LANGUAGES=nor+eng
OCR_TIMEOUT_MS=20000
MAX_OCR_BYTES=15728640
MAX_EXTRACTED_TEXT_CHARACTERS=200000
# --- Evidence LLM judge (optional; disabled by default) ---
EVIDENCE_JUDGE_PROVIDER=disabled
EVIDENCE_JUDGE_MODEL=
EVIDENCE_JUDGE_VERSION=evidence_claim_v1
EVIDENCE_JUDGE_TIMEOUT_MS=10000
EVIDENCE_JUDGE_MAX_CHARACTERS=20000
ANTHROPIC_API_KEY=
+5 -4
View File
@@ -9,8 +9,9 @@ if [ "$1" = "--skip-pull" ]; then
fi
SERVER="${DEPLOY_SERVER:-root@76.13.144.52}"
REMOTE_DIR="${DEPLOY_DIR:-/opt/osint-board}"
COMPOSE="docker compose -f ${REMOTE_DIR}/docker-compose.prod.yml --env-file /opt/gu_common/.env.prod"
REMOTE_DIR="${DEPLOY_DIR:-/opt/gupi}"
# GUPI runs from its own dir with its own env; the shared services come from gu_common.
COMPOSE="docker compose -f ${REMOTE_DIR}/docker-compose.prod.yml --env-file ${REMOTE_DIR}/.env.prod"
TARGET_HOST=$(echo "${SERVER}" | sed 's/.*@//')
OWN_IP=$(curl -sf --max-time 3 ifconfig.me 2>/dev/null || echo "unknown")
@@ -54,8 +55,8 @@ rsync -avz --delete \
--exclude '.DS_Store' \
./ "${SERVER}:${REMOTE_DIR}/"
echo "==> Verifying gu_common configuration..."
ssh "$SERVER" "test -f /opt/gu_common/.env.prod || { echo 'ERROR: /opt/gu_common/.env.prod is missing'; exit 1; }"
echo "==> Verifying GUPI environment..."
ssh "$SERVER" "test -f ${REMOTE_DIR}/.env.prod || { echo 'ERROR: ${REMOTE_DIR}/.env.prod is missing (copy .env.prod.example and fill it in)'; exit 1; }"
echo "==> Ensuring shared network exists..."
ssh "$SERVER" "docker network create gnommo 2>/dev/null || true"