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.
This commit is contained in:
epistemophiliac 2026-06-16 21:57:13 -04:00
parent 2aca11bb75
commit 1ba0f85d0f
2 changed files with 5 additions and 3 deletions

View file

@ -108,7 +108,7 @@ services:
wait-for-it -t 120 db:3306;
wait-for-it -t 120 redis-cache:6379;
wait-for-it -t 120 redis-queue:6379;
if [ -d "sites/$$SITE" ]; then echo "[create-site] exists"; $$B use "$$SITE"; else echo "[create-site] creating"; INSTALL_ARGS=""; IFS=',' read -r -a apps <<< "$$INSTALL_APPS"; for app in "$${apps[@]}"; do INSTALL_ARGS="$$INSTALL_ARGS --install-app $$app"; done; $$B new-site "$$SITE" --mariadb-user-host-login-scope='%' --admin-password "$$ADMIN_PASSWORD" --db-root-password "$$DB_PASSWORD" $$INSTALL_ARGS --set-default; fi
if [ -d "sites/$$SITE" ]; then echo "[create-site] exists"; $$B use "$$SITE"; else echo "[create-site] creating (10-20 min first time — progress bars suppressed in deploy log)"; INSTALL_ARGS=""; IFS=',' read -r -a apps <<< "$$INSTALL_APPS"; for app in "$${apps[@]}"; do INSTALL_ARGS="$$INSTALL_ARGS --install-app $$app"; done; set -o pipefail; $$B new-site "$$SITE" --mariadb-user-host-login-scope='%' --admin-password "$$ADMIN_PASSWORD" --db-root-password "$$DB_PASSWORD" $$INSTALL_ARGS --set-default 2>&1 | grep -vE '^Updating DocTypes for '; fi
environment:
- 'SITE_NAME=${SITE_NAME:-${SERVICE_FQDN_FRONTEND}}'
- 'ADMIN_PASSWORD=${ADMIN_PASSWORD:-changeme}'
@ -132,7 +132,8 @@ services:
if [ "$$MIGRATE_SITES" != "true" ]; then echo "[migrator] disabled"; exit 0; fi;
if [ -z "$$(find sites -mindepth 2 -maxdepth 2 -name site_config.json 2>/dev/null)" ]; then echo "[migrator] no sites"; exit 0; fi;
echo "[migrator] migrating all sites";
bench --site all migrate;
set -o pipefail;
bench --site all migrate 2>&1 | grep -vE '^Updating DocTypes for ';
environment:
- 'MIGRATE_SITES=${MIGRATE_SITES:-true}'
depends_on:

View file

@ -83,5 +83,6 @@ Login: `https://your-domain` — user `Administrator`, password = `ADMIN_PASSWOR
| `SITE_NAME empty` on create-site | Assign domain on `frontend:8080` before deploy |
| Wrong site / 404 nginx | Delete old `SITE_NAME` in Coolify UI; ensure header matches domain |
| Site created with wrong name | Wipe `sites` volume or rename site manually — env change alone won't rename |
| Deploy fails at pull / `No such image` | Run `scripts/coolify/sync-main-from-forgejo.sh` on host, or Jenkins **Build Now** (preloads `:main`) |
| Deploy log page crashes / blank | First `create-site` is huge — fixed by filtering DocType spam; redeploy after site exists |
| create-site finished but backend/scheduler not running | Deploy timed out during first site install — **redeploy** (site exists, starts in seconds) |
| Image pull failed | Ensure `:main` on host via Jenkins or sync script — do not pull large image through Cloudflare |