-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
54 lines (51 loc) · 1.28 KB
/
docker-compose.yaml
File metadata and controls
54 lines (51 loc) · 1.28 KB
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
52
53
54
services:
db:
image: postgres:17
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- TZ=Asia/Seoul
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d queueme"]
interval: 3s
timeout: 3s
retries: 5
user-todo-service:
build: ./user-todo-api
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
volumes:
- ./user-todo-api:/app
ports:
- "8000:8000"
env_file:
- .env
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- TZ=Asia/Seoul
depends_on:
db:
condition: service_healthy
restart: on-failure
community-service:
build: ./community-api
command: uvicorn main:app --host 0.0.0.0 --port 8001 --reload
volumes:
- ./community-api:/app
ports:
- "8001:8001"
env_file:
- .env
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- TZ=Asia/Seoul
depends_on:
db:
condition: service_healthy
restart: on-failure
volumes:
postgres_data: