From 5ea7cce56b4f874cc990dcfbd00b2eb2a9d5874e Mon Sep 17 00:00:00 2001 From: Ryan Westfall Date: Sun, 6 Sep 2026 20:31:42 -0500 Subject: [PATCH] Point CI and deploy at app_catalog.print_forge on master. Gitea was still targeting main and a leftover client-ci compose name, so PRs and server-infra --app print_forge would miss each other. --- .gitea/workflows/ci.yml | 2 +- .gitea/workflows/deploy-beta.yml | 3 ++- .gitea/workflows/deploy-prod.yml | 3 ++- README.md | 4 +++- scripts/validate-env.sh | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2ff9c9c..5312d59 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: pull_request: - branches: [main] + branches: [master] jobs: test: diff --git a/.gitea/workflows/deploy-beta.yml b/.gitea/workflows/deploy-beta.yml index 760ea52..ade4980 100644 --- a/.gitea/workflows/deploy-beta.yml +++ b/.gitea/workflows/deploy-beta.yml @@ -45,7 +45,7 @@ jobs: COMPOSE_DATABASE_URL DJANGO_ENV DJANGO_SECRET_KEY DJANGO_DEBUG \ DJANGO_ALLOWED_HOSTS || true - PROJECT="client-ci-${{ gitea.sha }}" + PROJECT="print-forge-ci-${{ gitea.sha }}" cleanup() { docker compose -p "$PROJECT" down -v --remove-orphans || true; } trap cleanup EXIT @@ -66,6 +66,7 @@ jobs: SERVER_INFRA_ROOT: /home/westfarn/Documents/repos/server-infra ANSIBLE_PRIVATE_KEY_FILE: /home/westfarn/.ssh/ansible_deploy steps: + # --app must match server-infra app_catalog (print_forge). - name: Deploy print_forge beta to all webservers run: | "$SERVER_INFRA_ROOT/scripts/deploy.sh" \ diff --git a/.gitea/workflows/deploy-prod.yml b/.gitea/workflows/deploy-prod.yml index fc8f693..2aed689 100644 --- a/.gitea/workflows/deploy-prod.yml +++ b/.gitea/workflows/deploy-prod.yml @@ -43,7 +43,7 @@ jobs: COMPOSE_DATABASE_URL DJANGO_ENV DJANGO_SECRET_KEY DJANGO_DEBUG \ DJANGO_ALLOWED_HOSTS || true - PROJECT="client-ci-${{ gitea.sha }}" + PROJECT="print-forge-ci-${{ gitea.sha }}" cleanup() { docker compose -p "$PROJECT" down -v --remove-orphans || true; } trap cleanup EXIT @@ -64,6 +64,7 @@ jobs: SERVER_INFRA_ROOT: /home/westfarn/Documents/repos/server-infra ANSIBLE_PRIVATE_KEY_FILE: /home/westfarn/.ssh/ansible_deploy steps: + # --app must match server-infra app_catalog (print_forge). - name: Deploy print_forge prod to all webservers run: | "$SERVER_INFRA_ROOT/scripts/deploy.sh" \ diff --git a/README.md b/README.md index 8b9771e..6f64661 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,9 @@ cp .env.prod.example ~/Documents/secrets/print_forge/print_forge_prod.env ./scripts/validate-env.sh ~/Documents/secrets/print_forge/print_forge_prod.env ``` -Infra: Postgres on 10.0.0.230, server-infra app_catalog, NPM, CI. +Infra: Postgres on 10.0.0.230, server-infra `app_catalog.print_forge`, NPM, CI. +Gitea deploy calls `deploy.sh --app print_forge` (must match that catalog key). +Secrets: `~/Documents/secrets/print_forge/print_forge_{prod,beta}.env`. Create a portal user with `createsuperuser` after first deploy. ## Stack diff --git a/scripts/validate-env.sh b/scripts/validate-env.sh index d24e86a..2f05dd5 100755 --- a/scripts/validate-env.sh +++ b/scripts/validate-env.sh @@ -128,7 +128,7 @@ done if ((${#missing[@]} > 0)); then echo "Missing required environment variables in $ENV_FILE:" >&2 printf ' - %s\n' "${missing[@]}" >&2 - echo "Copy .env.prod.example to ~/Documents/secrets/_site/_site_${DJANGO_ENV}.env and set values." >&2 + echo "Copy .env.prod.example to ~/Documents/secrets/print_forge/print_forge_${DJANGO_ENV}.env and set values." >&2 exit 1 fi