From abd6e5c21b887781acf326f1aef6007c67f9b496 Mon Sep 17 00:00:00 2001 From: francesco Date: Fri, 19 Jun 2026 16:40:19 +0200 Subject: [PATCH] ++ fix --- docker-compose.yml | 8 ++++++++ docker/php/entrypoint.sh | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 0b42804..6c05d67 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,14 @@ services: start_period: 45s environment: - PHP_OPCACHE_VALIDATE_TIMESTAMPS=1 + # DB/Redis creds must be passed into the container so the entrypoint can + # upsert them into .env. Defaults match the mariadb/redis services below. + - DB_HOST=${DB_HOST:-mariadb} + - DB_DATABASE=${DB_DATABASE:-termanager2} + - DB_USERNAME=${DB_USERNAME:-termanager2} + - DB_PASSWORD=${DB_PASSWORD:-secret} + - REDIS_HOST=${REDIS_HOST:-redis} + - REDIS_PASSWORD=${REDIS_PASSWORD:-redissecret} - SEED_DEV_DATA=${SEED_DEV_DATA:-false} - RUN_DB_SEED_ON_FIRST_START=${RUN_DB_SEED_ON_FIRST_START:-true} - ENSURE_INITIAL_ADMIN_ON_EMPTY_DB=${ENSURE_INITIAL_ADMIN_ON_EMPTY_DB:-true} diff --git a/docker/php/entrypoint.sh b/docker/php/entrypoint.sh index bebc7e2..93ffed2 100755 --- a/docker/php/entrypoint.sh +++ b/docker/php/entrypoint.sh @@ -174,6 +174,13 @@ else echo "[✓] Storage symlink already exists." fi +# ----------------------------------------------- +# 6b. Clear any stale cached config from a previous deploy +# (a cached bootstrap/cache/config.php would override the .env above) +# ----------------------------------------------- +echo "[*] Clearing stale cached config..." +php artisan config:clear || warn "config:clear failed; continuing startup." + # ----------------------------------------------- # 7. Run migrations # -----------------------------------------------