-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcompose.yaml
48 lines (46 loc) · 1.12 KB
/
compose.yaml
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
services:
web:
container_name: uvicorn
build:
context: .
dockerfile: ./Containerfile
command: uvicorn tmt_web.api:app --reload --host 0.0.0.0 --port 8000
environment:
- REDIS_URL=redis://redis:6379
- API_HOSTNAME=http://localhost:8000
ports:
- 8000:8000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
redis:
container_name: redis
image: redis:latest
ports:
- 6379:6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
celery:
container_name: celery
build:
context: .
dockerfile: ./Containerfile
command: celery --app=tmt_web.service worker --loglevel=INFO
environment:
- REDIS_URL=redis://redis:6379
- API_HOSTNAME=http://localhost:8000
depends_on:
redis:
condition: service_healthy
restart: unless-stopped