🐛 fix: use correct DLC_DATABASE_HOST for Docker vs native execution

- Use localhost for native execution (PostgreSQL port mapping)
- Use dance-lessons-coach-postgres for Docker container execution
- Set appropriate environment variables for each execution mode
- Fix container-to-container communication

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-04-08 00:15:57 +02:00
parent f18716d447
commit 5ffa60ef65

View File

@@ -69,9 +69,7 @@ for i in {1..30}; do
done
# Set PostgreSQL environment variables for BDD tests
# Use localhost since PostgreSQL port is mapped to host
# Container name is only used when running INSIDE Docker containers
export DLC_DATABASE_HOST="localhost"
export DLC_DATABASE_HOST="localhost" # PostgreSQL port is mapped to host
export DLC_DATABASE_PORT=5432
export DLC_DATABASE_USER=postgres
export DLC_DATABASE_PASSWORD=postgres
@@ -132,7 +130,7 @@ if [ "$USE_DOCKER_CACHE" = true ]; then
--network dance-lessons-coach-network \
-v "$(pwd):/workspace" \
-w /workspace \
-e DLC_DATABASE_HOST=localhost \
-e DLC_DATABASE_HOST=dance-lessons-coach-postgres \
-e DLC_DATABASE_PORT=5432 \
-e DLC_DATABASE_USER=postgres \
-e DLC_DATABASE_PASSWORD=postgres \