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