-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
51 lines (47 loc) · 1.23 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: "3.9"
services:
pokemon-service:
build: ./pokemon-service
command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
volumes:
- ./pokemon-service:/usr/src/app
- ./db-models/models:/usr/src/models
ports:
- 8001:8000
environment:
- DATABASE_URL=postgres://postgres:postgres@app-db:5432/app_db_dev
- TEAM_SERVICE_URL=http://team-service:8000/teams/
- PYTHONPATH=/usr/src
depends_on:
- app-db
team-service:
build: ./team-service
command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
volumes:
- ./team-service:/usr/src/app
- ./db-models/models:/usr/src/models
ports:
- 8002:8000
environment:
- DATABASE_URL=postgres://postgres:postgres@app-db:5432/app_db_dev
- PYTHONPATH=/usr/src
depends_on:
- app-db
app-db:
build: ./db-service
expose:
- 5432
ports:
- 5432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
nginx-reverse-proxy:
image: nginx:latest
ports:
- 8080:8080
volumes:
- ./nginx_config.conf:/etc/nginx/conf.d/default.conf
depends_on:
- team-service
- pokemon-service