Commit graph

36 commits

Author SHA1 Message Date
20d1a46711 Persist Frappe site across domain changes and redeploys
Use stable SITE_NAME instead of SERVICE_FQDN_FRONTEND for site identity.
On redeploy: reuse existing site volume, recover from duplicate empty site
after domain change, and bench rename-site when folder name differs.
2026-06-16 23:23:20 -04:00
7d893d68b4 Document Traefik port label requirement for Coolify 4.1.x 2026-06-16 22:49:34 -04:00
f320055b68 Add Traefik loadbalancer port label for frontend:8080
Coolify 4.1.x omits loadbalancer.server.port when the domain has no :8080
suffix, causing Traefik 404. Explicit label targets nginx on 8080.
2026-06-16 22:47:39 -04:00
047802757e Expose port 8080 on frontend for Traefik routing
Traefik defaults to port 80 when no loadbalancer.server.port label exists;
Frappe nginx listens on 8080. expose: 8080 lets the docker provider pick it.
2026-06-16 22:40:34 -04:00
366da2d3cc Give backend more healthcheck time on redeploy
ERPNext gunicorn can exceed 180s + 15 retries (~6.5 min) after migrate.
Use 360s start_period, 20 retries, and fall back to SERVICE_FQDN_FRONTEND
when currentsite.txt is empty. Frontend gets the same Host fallback.
2026-06-16 22:31:39 -04:00
faf2d847cf Use SERVICE_URL_FRONTEND_8080 for Coolify Traefik routing
SERVICE_FQDN_FRONTEND_8080 is not generated when the domain is assigned
without a port suffix; Coolify needs SERVICE_URL_FRONTEND_8080 so Traefik
gets loadbalancer.server.port=8080 for Frappe nginx.
2026-06-16 22:24:44 -04:00
dad0d613fe Avoid $$host in compose env (breaks Coolify build-time.env)
Set FRAPPE_SITE_NAME_HEADER from currentsite.txt at frontend start
instead of FRAPPE_SITE_NAME_HEADER=$$host which Coolify writes as an
invalid $host= line in build-time.env.
2026-06-16 22:20:17 -04:00
7bdf4a0b9b Fix Coolify routing for Frappe frontend on port 8080
Use SERVICE_FQDN_FRONTEND_8080 so Traefik targets nginx:8080, pass
$$host to FRAPPE_SITE_NAME_HEADER, and healthcheck via currentsite.txt.
2026-06-16 22:19:01 -04:00
416b0f8109 Fix backend healthcheck for multi-site Frappe routing
Frappe returns 404 on /api/method/ping without a Host header matching
the site name. Pass SERVICE_FQDN_FRONTEND in healthchecks and drop
SITE_NAME env indirection that Coolify was caching as a literal.
2026-06-16 22:10:38 -04:00
cfee4fcfa3 Harden create-site deploy logs and Coolify env compatibility
Filter more bench install noise, set CI=1 to reduce progress spam, and
rely on compose defaults for SITE_NAME/FRAPPE_SITE_NAME_HEADER instead
of literal ${SERVICE_FQDN_FRONTEND} in Coolify env.
2026-06-16 22:01:55 -04:00
1ba0f85d0f Suppress DocType progress spam in deploy logs
First create-site floods Coolify with megabytes of progress output,
which can break the log UI and stall the deploy before backend starts.
Filter those lines in create-site and migrator; redeploy is fast once
the site already exists.
2026-06-16 21:57:13 -04:00
2aca11bb75 Use :main tag only and host sync instead of compose preload.
Remove image-preload service (compose creates all containers before it can run); Jenkins and sync-main-from-forgejo.sh load :main on the host internally.
2026-06-16 21:05:44 -04:00
260aa8c7da Fix image-preload ordering so ERPNext waits for internal copy.
YAML merge was dropping depends_on; configurator started before skopeo loaded the image.
2026-06-16 21:02:02 -04:00
4126cbf737 Load ERPNext image internally on Coolify deploy via Skopeo.
Add image-preload init service on Forgejo Docker network, default PULL_POLICY never, and preload host docker after Jenkins push.
2026-06-16 20:58:32 -04:00
e73912541e Add Coolify host image preload for large registry pulls.
Document exit 255 during multi-hundred-MB layer downloads and default PULL_POLICY to if_not_present after preload.
2026-06-16 20:49:15 -04:00
f2f7e6355d Wire Coolify domain to SITE_NAME and document env template
SERVICE_FQDN_FRONTEND from the frontend domain drives site creation and nginx
headers; coolify.env.example adds CUSTOM_IMAGE/CUSTOM_TAG for Jenkins registry pulls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 20:34:44 -04:00
cacbce384f Fix docker-compose for Coolify YAML re-parse rules.
Single-line if/fi in create-site, quoted env list form, and MariaDB healthcheck defaults per coolify-docker-compose skill.
2026-06-16 20:33:09 -04:00
26933f3e66 Push registry images via Skopeo on internal Forgejo network.
Bypass Cloudflare/Traefik 413 limits by copying to forgejo:3000 over Docker network instead of docker push to git.aexoradao.com.
2026-06-16 20:17:46 -04:00
1ca8192a4c Fix registry 413: patch host /etc/hosts before docker push.
docker.sock pushes use host networking; route git.aexoradao.com to 127.0.0.1 to bypass Cloudflare upload limits.
2026-06-16 20:06:39 -04:00
ebe9a41501 Document and harden registry push against 413 Payload Too Large.
Use ephemeral docker login config; document Cloudflare bypass via Jenkins extra_hosts.
2026-06-16 19:57:43 -04:00
e1facdec3d Install docker buildx in Jenkins CI for BuildKit secret mounts.
Bootstrap downloads the buildx plugin; image build uses buildx build --load with a persistent builder.
2026-06-16 19:21:50 -04:00
17c2c5ead8 Add custom Frappe image build with HRMS, Lending, and LMS.
Jenkins builds from apps.json, pushes to Forgejo registry, and archives Coolify image tags; compose installs all apps on first site creation.
2026-06-16 19:10:17 -04:00
3eefb73727 Fix Jenkins compose stage: avoid source under /bin/sh.
Jenkins sh steps use dash; move compose validation into a bash script like the other CI stages.
2026-06-16 18:47:18 -04:00
Tyler Landes
f57072667c Split Jenkins CI into visible stages for Coolify ERPNext validation.
Each check runs in its own pipeline stage (readiness, compose, image pull) so Jenkins shows clear pass/fail per section.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 18:43:02 -04:00
e9cbc9f88f Document Jenkins git cache and docker.sock troubleshooting 2026-06-16 18:35:15 -04:00
b2fe6695a0 Check docker.sock before printing docker version 2026-06-16 18:33:50 -04:00
292a0026ed Handle docker.sock permission errors in Jenkins CI 2026-06-16 18:33:42 -04:00
a644d2df3d CI revision 4: move pipeline logic to scripts/ci/jenkins-run.sh
Minimal Jenkinsfile so Jenkins must checkout repo before running CI.
Look for "erpnext CI revision 4" in build log to confirm latest code.
2026-06-16 18:31:32 -04:00
ab248f3665 Rewrite Jenkinsfile (CI revision 3)
Use explicit .ci-bin/docker-compose paths only; split install and smoke
stages; print commit SHA so builds are not confused with old replays.
2026-06-16 18:30:42 -04:00
752f6da269 Always use standalone docker-compose in Jenkins CI
Avoid docker compose subcommand (not in static docker CLI). Cache
binaries in .ci-bin and drop duplicate checkout stage.
2026-06-16 18:29:47 -04:00
2ed6c611cb Install standalone docker-compose binary in Jenkins pipeline
Static docker CLI does not include compose v2; download docker-compose
alongside docker for compose config smoke tests.
2026-06-16 18:28:58 -04:00
368070e3ba Fix Jenkins compose smoke when docker CLI is missing
Bootstrap static docker binary in the pipeline; Jenkins has docker.sock
mounted but the official image does not ship the docker client.
2026-06-16 18:27:43 -04:00
08383b64bf Add Jenkins setup doc (multibranch discover branches fix) 2026-06-16 18:12:39 -04:00
538a2474dd Switch CI from Forgejo Actions to Jenkins
Remove GitHub/Forgejo workflow; add Jenkinsfile that runs production
readiness scripts, compose config smoke, and frappe/erpnext image pull.
2026-06-16 18:10:27 -04:00
4144bd1115 Target epistemophiliac/erpnext and extend CI for Coolify deploy
Some checks failed
Production Readiness / Coolify compose readiness (push) Has been cancelled
Production Readiness / Render and validate stack (push) Has been cancelled
Point docs at the new Forgejo repo, add compose render artifact upload,
and verify the pinned frappe/erpnext image pulls in CI before Coolify deploy.
2026-06-16 17:56:24 -04:00
0c8d593d40 Add production ERPNext Coolify stack with CI gates
Single compose file for Coolify: MariaDB, Redis, idempotent site creation,
migrations on redeploy, SERVICE_URL_FRONTEND_8080 routing, and Forgejo Actions
readiness validation vendored from production-ci-readiness skill.
2026-06-16 17:52:02 -04:00