From 416cd807a31382ccfdbbf5002fd39458b48ef367 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Mon, 29 Jun 2026 14:09:59 +0200 Subject: [PATCH] fix(sandbox): run Dolibarr in dev mode (DOLI_PROD=0) + correct install.lock path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After seeding erp-sandbox from prod, the home dashboard rendered a generic "technical error" banner per box: prod mode ($dolibarr_main_prod=1, the image default via DOLI_PROD) escalates the seed's minor non-fatal warnings into that banner. Setting DOLI_PROD=0 for non-prod environments makes Dolibarr render real errors inline (correct for a rehearsal env) and clears the banners. config.yaml adds `DOLI_PROD: "0"` only when env != prod, so the prod configmap is byte-identical (prod keeps the image default DOLI_PROD=1) — verified via helm template diff. ArgoCD rolls only the sandbox pod. Also corrects the test/README install.lock path: Dolibarr checks the DATA root (/var/www/documents, a PVC — persists across restarts), not /var/www/html. And notes that a prod-seeded sandbox still needs install.lock created (the seed + documents/mycompany sync don't include it). Co-Authored-By: Claude Opus 4.7 (1M context) --- chart/templates/config.yaml | 5 +++++ test/README.md | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/chart/templates/config.yaml b/chart/templates/config.yaml index 432468c..cab56fb 100644 --- a/chart/templates/config.yaml +++ b/chart/templates/config.yaml @@ -20,4 +20,9 @@ data: PHP_INI_DATE_TIMEZONE: Europe/Paris DOLI_AUTH: dolibarr DOLI_CRON: !!str 0 + {{- if ne .Values.env "prod" }} + # Non-prod (sandbox): dev mode — render real errors inline instead of the generic + # prod "technical error" banner. Prod keeps the image default (DOLI_PROD=1). + DOLI_PROD: !!str 0 + {{- end }} # DOLI_INSTANCE_UNIQUE_ID: \ No newline at end of file diff --git a/test/README.md b/test/README.md index 185d1e7..b35d417 100644 --- a/test/README.md +++ b/test/README.md @@ -34,12 +34,14 @@ sandbox: ```sh kubectl -n erp-sandbox exec \ "$(kubectl get pod -n erp-sandbox -l app.kubernetes.io/instance=erp-sandbox -o name)" -- \ - /bin/sh -c 'touch /var/www/html/install.lock && chown www-data:www-data /var/www/html/install.lock' + /bin/sh -c 'touch /var/www/documents/install.lock && chown www-data:www-data /var/www/documents/install.lock' ``` -For prod, swap to `-n erp -l app.kubernetes.io/instance=erp`. Not needed when the -instance was seeded from a prod dump instead of freshly installed — see -`../ops/sandbox/`. +The path is the Dolibarr **data root** (`/var/www/documents`, a PVC) — that's where +Dolibarr checks, and being on the PVC the lock persists across pod restarts. For +prod, swap to `-n erp -l app.kubernetes.io/instance=erp`. A sandbox **seeded** from +prod still needs this: the seed (see `../ops/sandbox/`) copies the DB + +`documents/mycompany`, not `install.lock`. ## Provision the sandbox