diff --git a/docker-compose.yml b/docker-compose.yml index d67a06e..8c33b17 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,12 @@ services: ports: - "${APP_PORT:-80}:80" - "${VITE_PORT:-5173}:5173" - env_file: .env + # Laravel reads .env from the bind mount. Do NOT inject it as real env vars + # (env_file): that would override the test env (phpunit force) and let the + # test suite run against the dev DB. Only vite needs these at process level. + environment: + VITE_HMR_HOST: ${VITE_HMR_HOST:-localhost} + VITE_PORT: ${VITE_PORT:-5173} depends_on: mariadb: condition: service_healthy @@ -32,7 +37,6 @@ services: - .:/var/www/html ports: - "${REVERB_HOST_PORT:-8080}:8080" - env_file: .env depends_on: - app - redis @@ -43,7 +47,6 @@ services: command: php artisan queue:work redis --tries=3 --timeout=90 volumes: - .:/var/www/html - env_file: .env depends_on: - app - redis @@ -55,7 +58,6 @@ services: command: php artisan schedule:work volumes: - .:/var/www/html - env_file: .env depends_on: - app - redis