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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user