-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.16 KB
/
docker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.16 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
services:
redis-database:
container_name: redis-database
hostname: redis-database
image: redis:8.8.0
volumes:
- ./data:/data
environment:
REDIS_ARGS: --save 30 1
ports:
- "6379:6379"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 10s
retries: 5
start_period: 5s
timeout: 5s
backend:
build:
context: .
dockerfile: Dockerfile.backend
env_file:
- .env
depends_on:
redis-database:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/ready', timeout=3).read()",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
ports:
- "8080:80"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s