-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (42 loc) · 1.09 KB
/
docker-compose.yml
File metadata and controls
57 lines (42 loc) · 1.09 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
55
56
57
services:
fastapi-template-postgres-db:
image: postgres:16.6
container_name: fastapi-template-postgres-db
restart: unless-stopped
environment:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pgpass
POSTGRES_DB: fastapi-template-db
ports:
- "5434:5432"
volumes:
- fastapi-template_postgres_data:/var/lib/postgresql/data
networks:
- fastapi-template-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pguser"]
interval: 5s
timeout: 5s
retries: 5
fastapi-template-redis:
image: redis:7.2
container_name: fastapi-template-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- fastapi-template_redis_data:/data
networks:
- fastapi-template-network
command: ["redis-server", "--appendonly", "yes"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
volumes:
fastapi-template_postgres_data:
fastapi-template_redis_data:
networks:
fastapi-template-network:
name: fastapi-template-network