From a5e5f6e39216aabb39b444e67c9fb04d9eb960c0 Mon Sep 17 00:00:00 2001 From: Baiju Muthukadan Date: Mon, 16 Mar 2026 02:06:53 +0530 Subject: [PATCH] docs: update deploy prompt for multi-app workflow Update Phase 3 to reference bootstrap-server.sh instead of manual steps, Phase 4 to reflect new workflow (.env on server, fewer secrets needed), and important notes to document multi-app behavior (auto DB creation, generated Caddyfile, .env requirement). Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/deploy-prompt.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/deploy-prompt.md b/docs/deploy-prompt.md index 92d6715..d77585d 100644 --- a/docs/deploy-prompt.md +++ b/docs/deploy-prompt.md @@ -29,15 +29,16 @@ Walk me through these 5 phases: - Commit with conventional commit messages (feat:, fix:, etc.) ### Phase 3: Provision server -- SSH into the server and install Docker -- Create /data/{postgres,redis,minio,caddy} directories +- Run `bootstrap-server.sh` on a fresh Debian 12 server (installs Docker, creates directories, starts platform services) - Set up DNS A record: -> -- Generate a deploy SSH key pair +- Generate a deploy SSH key pair for the `deploy` user +- Run `verify-server.sh` to confirm the platform is healthy ### Phase 4: Deploy -- Configure GitHub Actions secrets (SERVER_HOST, SERVER_USER, SERVER_SSH_KEY, APP_DOMAIN, DATABASE_PASSWORD, MINIO_ROOT_USER, MINIO_ROOT_PASSWORD) +- SSH to server: create /opt/apps/, clone the repo, create deploy/.env from deploy/env.template using credentials from /opt/platform/.env +- Configure GitHub Actions secrets (SERVER_HOST, SERVER_USER, SERVER_SSH_KEY, APP_DOMAIN) - Push to main to trigger the deploy workflow -- The workflow will: build containers, start services with docker-compose.standalone.yml, run migrations inside the container, then health check +- The workflow will: verify .env exists, auto-create the app database, build containers, run migrations, health check, generate Caddyfile, reload Caddy - Verify with: curl https:///health ### Phase 5: Configure CI/CD @@ -47,8 +48,10 @@ Walk me through these 5 phases: Important notes: - The app-template already includes all deployment fixes (correct migration ordering, __init__.py, PYTHONPATH, alembic -c flag) -- Standalone mode uses docker-compose.standalone.yml which includes postgres, redis, minio, and caddy -- Migrations run AFTER containers start: docker compose exec app alembic -c app/alembic.ini upgrade head +- Multi-app mode uses deploy/docker-compose.yml which joins the shared `towlion` network (platform provides postgres, redis, minio, caddy) +- The deploy workflow auto-creates a per-app database (e.g., todo_app_db) — no manual DB setup needed +- Caddyfile is generated by the workflow (not symlinked) with the literal domain and project-prefixed container name +- deploy/.env must exist on the server before the first push — the workflow fails fast if missing - requirements.txt must be at repo root (not app/) for the Dockerfile build context ```