-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose-step1.yml
53 lines (50 loc) · 985 Bytes
/
docker-compose-step1.yml
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
version: '3.8'
services:
redis:
image: redis:7-alpine
ports:
- mode: host
published: 6379
target: 6379
deploy:
mode: global
restart_policy:
condition: on-failure
logging:
driver: json-file
options:
max-size: "100k"
max-file: "1"
cron:
image: conf42-demo:latest
deploy:
mode: global
restart_policy:
condition: on-failure
environment:
- CONTAINER_ROLE=cron_1
- REDIS_HOST=redis
volumes:
- .:/app
logging:
driver: json-file
options:
max-size: "100k"
max-file: "1"
worker:
image: conf42-demo:latest
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
environment:
- CONTAINER_ROLE=worker_1
- REDIS_HOST=redis
volumes:
- .:/app
logging:
driver: json-file
options:
max-size: "100k"
max-file: "1"