Skip to content

Commit 922d485

Browse files
Update local docker compose
1 parent 52c0563 commit 922d485

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

docker-compose.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ services:
77
environment:
88
SUPABASE_URL: ${SUPABASE_URL}
99
SUPABASE_KEY: ${SUPABASE_KEY}
10-
SUPABASE_DB_URL: ${SUPABASE_DB_URL}
10+
SUPABASE_DB_URL: postgresql://postgres:postgres@supabase_db_policyengine-api-v2:5432/postgres
1111
LOGFIRE_TOKEN: ${LOGFIRE_TOKEN}
1212
DEBUG: "true"
1313
API_PORT: ${API_PORT:-8000}
1414
volumes:
1515
- ./src:/app/src
16+
networks:
17+
- supabase_network_policyengine-api-v2
1618
healthcheck:
1719
test: ["CMD", "python", "-c", "import httpx; exit(0 if httpx.get('http://localhost:${API_PORT:-8000}/health', timeout=2).status_code == 200 else 1)"]
1820
interval: 5s
@@ -26,27 +28,35 @@ services:
2628
environment:
2729
SUPABASE_URL: ${SUPABASE_URL}
2830
SUPABASE_KEY: ${SUPABASE_KEY}
29-
SUPABASE_DB_URL: ${SUPABASE_DB_URL}
31+
SUPABASE_DB_URL: postgresql://postgres:postgres@supabase_db_policyengine-api-v2:5432/postgres
3032
LOGFIRE_TOKEN: ${LOGFIRE_TOKEN}
3133
WORKER_POLL_INTERVAL: ${WORKER_POLL_INTERVAL:-60}
3234
volumes:
3335
- ./src:/app/src
36+
networks:
37+
- supabase_network_policyengine-api-v2
3438

3539
test:
3640
build: .
3741
command: pytest tests/ -v
3842
environment:
3943
SUPABASE_URL: ${SUPABASE_URL}
4044
SUPABASE_KEY: ${SUPABASE_KEY}
41-
SUPABASE_DB_URL: ${SUPABASE_DB_URL}
45+
SUPABASE_DB_URL: postgresql://postgres:postgres@supabase_db_policyengine-api-v2:5432/postgres
4246
LOGFIRE_TOKEN: ${LOGFIRE_TOKEN}
4347
volumes:
4448
- ./src:/app/src
4549
- ./tests:/app/tests
50+
networks:
51+
- supabase_network_policyengine-api-v2
4652
depends_on:
4753
api:
4854
condition: service_healthy
4955
worker:
5056
condition: service_started
5157
profiles:
5258
- test
59+
60+
networks:
61+
supabase_network_policyengine-api-v2:
62+
external: true

0 commit comments

Comments
 (0)