-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
38 lines (36 loc) · 723 Bytes
/
compose.yaml
File metadata and controls
38 lines (36 loc) · 723 Bytes
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
services:
db:
image: postgres:17
container_name: db_app
command: -p 1221
expose:
- "1221"
env_file:
- .env
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-p", "1221"]
interval: 5s
timeout: 3s
retries: 5
redis:
image: redis:7
container_name: redis_app
command: --port 5370
expose:
- "5370"
healthcheck:
test: ["CMD", "redis-cli", "-p", "5370", "ping"]
interval: 5s
timeout: 3s
retries: 5
app:
build:
context: .
container_name: fastapi_app
ports:
- "9999:8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy