fix: Update test database connection to use host.docker.internal

- Changed DB_HOST from localhost to host.docker.internal
- Added extra_hosts configuration to enable host-gateway access
- This allows test container to connect to the existing PostgreSQL database
This commit is contained in:
openhands 2025-11-01 17:08:11 +00:00
parent beda7429c3
commit 2b52e27532
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,7 @@ services:
ports: ports:
- "8081:8081" - "8081:8081"
environment: environment:
- DB_HOST=localhost - DB_HOST=host.docker.internal
- DB_PORT=5432 - DB_PORT=5432
- DB_NAME=calejo - DB_NAME=calejo
- DB_USER=calejo - DB_USER=calejo
@ -21,6 +21,8 @@ services:
- REST_API_PORT=8081 - REST_API_PORT=8081
- HEALTH_MONITOR_PORT=9091 - HEALTH_MONITOR_PORT=9091
- LOG_LEVEL=DEBUG - LOG_LEVEL=DEBUG
extra_hosts:
- "host.docker.internal:host-gateway"
volumes: volumes:
- ./static:/app/static - ./static:/app/static
- ./logs:/app/logs - ./logs:/app/logs