Document exact step-by-step execution order in dev.sh/prod.sh headers
Spells out what actually happens on each run, in order, including the hard-stop-at-any-step behavior in prod.sh's gates — so reading the header is enough to know the full sequence without tracing through the script. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
This commit is contained in:
parent
e28715ba34
commit
9c7db8580d
|
|
@ -6,6 +6,20 @@
|
|||
# as often as you want while developing; nothing here touches git or the
|
||||
# registry — see scripts/prod.sh for shipping what you've tested here.
|
||||
#
|
||||
# What happens when this runs, in order:
|
||||
# 1. ./erpnext-image/build.sh — CUSTOM_IMAGE in the root .env is a bare
|
||||
# local tag (not a registry path), so this takes the local branch:
|
||||
# builds sightbox-erpnext for this machine's own architecture, no push.
|
||||
# 2. ./backend/build.sh — same thing for BACKEND_BILLING_IMAGE: builds
|
||||
# sightbox-backend-billing locally, no push.
|
||||
# 3. docker compose up -d --force-recreate on every service that runs
|
||||
# from either image — the seven ERPNext-image services (configurator,
|
||||
# backend, frontend, websocket, queue-short, queue-long, scheduler)
|
||||
# plus backend-billing — so the freshly-built images actually get
|
||||
# picked up. (Compose has no "recreate everyone using image X" — it
|
||||
# only accepts service names, so all eight get listed individually
|
||||
# even though only one or two images actually changed.)
|
||||
#
|
||||
# Usage (from the sightbox/ project root or from here — either works):
|
||||
# ./scripts/dev.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,28 @@
|
|||
# prod.sh run. Add those three to .env.prod yourself if you'd rather
|
||||
# switch entirely to the direct-API trigger instead.
|
||||
#
|
||||
# What happens when this runs, in order — a hard stop at any step means
|
||||
# nothing after it ever runs:
|
||||
# 1. Branch check — exits unless currently on main.
|
||||
# 2. Clean-tree check — exits if `git status --porcelain` shows anything
|
||||
# uncommitted, so what ships always matches an actual commit.
|
||||
# 3. Loads scripts/.env.prod — exits if it doesn't exist yet; otherwise
|
||||
# exports the real CUSTOM_IMAGE/CUSTOM_TAG/BACKEND_BILLING_IMAGE/
|
||||
# BACKEND_BILLING_TAG registry paths into this shell.
|
||||
# 4. Runs backend/tests/ via pytest — any failure stops here, before
|
||||
# anything is built or pushed.
|
||||
# 5. ./erpnext-image/build.sh — sees the registry-path CUSTOM_IMAGE from
|
||||
# step 3, takes its registry branch: builds for linux/amd64 via
|
||||
# buildx (not this machine's own arch) and pushes straight to the
|
||||
# registry.
|
||||
# 6. ./backend/build.sh — same thing for backend-billing: builds for
|
||||
# linux/amd64, pushes to the registry. DOKPLOY_URL/DOKPLOY_API_TOKEN/
|
||||
# DOKPLOY_COMPOSE_ID are deliberately unset (see above), so this step
|
||||
# stops after pushing — it does not call Dokploy's API itself.
|
||||
# 7. git push origin main — the actual deploy trigger. Dokploy's
|
||||
# AutoDeploy watches main and redeploys on push, pulling both
|
||||
# freshly-pushed images.
|
||||
#
|
||||
# Usage: ./scripts/prod.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
|
|
|||
Loading…
Reference in New Issue