-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
104 lines (95 loc) · 1.98 KB
/
Copy pathdocker-compose.yml
File metadata and controls
104 lines (95 loc) · 1.98 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: "3.0"
services:
db:
image: postgres:15
container_name: db
restart: always
# ports:
# - 5123:5432
env_file:
- .db.env
volumes:
- ../pData:/var/lib/postgresql/data
healthcheck:
test:
["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} -t 1"]
interval: 30s
timeout: 60s
retries: 10
start_period: 60s
networks:
- microservice
ts-plugin:
container_name: ts-plugin
build:
context: .
dockerfile: docker/Dockerfile
depends_on:
db:
condition: service_healthy
networks:
- microservice
links:
- db
volumes:
- ../logs:/app/logs
redis:
image: redis:7-alpine
container_name: redis
restart: always
networks:
- microservice
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
celery_worker:
container_name: celery_worker
build:
context: .
dockerfile: docker/Dockerfile
command: celery -A user_service worker --loglevel=error --concurrency=20
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- service_logs:/home/ts-app/logs
networks:
- microservice
celery_beat:
container_name: celery_beat
build:
context: .
dockerfile: docker/Dockerfile
command: celery -A user_service beat --loglevel=error
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- service_logs:/home/ts-app/logs
networks:
- microservice
nginx:
container_name: nginx
build:
context: .
dockerfile: docker/nginx/Dockerfile
links:
- ts-plugin
ports:
- "0.0.0.0:80:80"
networks:
- microservice
- logger
volumes:
- ./staticfiles:/staticfiles
networks:
microservice:
logger:
volumes:
service_logs: