Skip to content

Commit bb237cf

Browse files
authored
Merge pull request #127 from dataforgoodfr/126_docker_shared_network_dev
[DB][DEV] Added docker network for APIs (#126_docker_shared_network_dev)
2 parents c8631ed + d701e1d commit bb237cf

File tree

9 files changed

+412
-5
lines changed

9 files changed

+412
-5
lines changed

dispatcher/.env.dev

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DB_HOST=db
2+
DB_PORT=5432
3+
RESCUE_API_POSTGRES_DB=us_climate_data
4+
RESCUE_API_POSTGRES_USER=postgres
5+
RESCUE_API_POSTGRES_PASSWORD=my_password

dispatcher/docker-compose.dev.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@ services:
22
dispatcher-rescue-api:
33
volumes:
44
- .:/app
5-
command: uv run fastapi dev api/dispatcher_service.py --host 0.0.0.0 --port 8081
5+
command: uv run fastapi dev api/dispatcher_service.py --host 0.0.0.0 --port 8081
6+
networks:
7+
- rescue_db
8+
9+
networks:
10+
rescue_db:
11+
name: rescue_db
12+
external: true

dispatcher/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ dependencies = [
1010
"pydantic>=2.11.7",
1111
"pydantic_core>=2.33.2",
1212
"uvicorn==0.35.0",
13+
"psycopg2-binary>=2.9.9",
14+
"sqlalchemy>=2.0.0",
1315
]

dispatcher/uv.lock

Lines changed: 185 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

priorizer/.env.dev

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
DB_HOST=db
2+
DB_PORT=5432
3+
RESCUE_API_POSTGRES_DB=us_climate_data
4+
RESCUE_API_POSTGRES_USER=postgres
5+
RESCUE_API_POSTGRES_PASSWORD=my_password

priorizer/docker-compose.dev.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@ services:
22
priorizer-api:
33
volumes:
44
- .:/app
5-
command: uv run fastapi dev main.py --host 0.0.0.0 --port 8082
5+
command: uv run fastapi dev main.py --host 0.0.0.0 --port 8082
6+
networks:
7+
- rescue_db
8+
9+
networks:
10+
rescue_db:
11+
name: rescue_db
12+
external: true

priorizer/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ dependencies = [
1414
"starlette>=0.47.2",
1515
"typing-extensions>=4.14.1",
1616
"uvicorn==0.35.0",
17+
"psycopg2-binary>=2.9.9",
18+
"sqlalchemy>=2.0.0",
1719
]

priorizer/uv.lock

Lines changed: 185 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rescue_db/docker-compose.dev.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,15 @@ services:
44
- .:/app
55
environment:
66
- PYTHONPATH=/app:/app/rescue_db
7-
command: uv run fastapi dev rescue_api/main.py --host 0.0.0.0 --port 80
7+
command: uv run fastapi dev rescue_api/main.py --host 0.0.0.0 --port 80
8+
networks:
9+
- rescue_db
10+
11+
db:
12+
networks:
13+
- rescue_db
14+
15+
networks:
16+
rescue_db:
17+
name: rescue_db
18+
driver: bridge

0 commit comments

Comments
 (0)