-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathdocker-compose.yml
89 lines (82 loc) · 1.88 KB
/
docker-compose.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
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
version: '3.5'
services:
digger-postgres:
image: postgres:9.6
hostname: digger-postgres
command: --timezone=PRC
networks:
- digger
# ports:
# - 15432:5432
volumes:
- ./db:/docker-entrypoint-initdb.d:ro
- postgres:/var/lib/postgresql/data
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
environment:
- TZ=Asia/Shanghai
- POSTGRES_USER=digger
- POSTGRES_PASSWORD=123456
- POSTGRES_DB=digger
- PGDATA=/var/lib/postgresql/data
digger-redis:
image: redis:5.0.9
hostname: digger-redis
command: redis-server --bind 0.0.0.0 --protected-mode no --appendonly yes --requirepass 123456
networks:
- digger
# ports:
# - 16379:6379
volumes:
- redis:/data
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
environment:
- TZ=Asia/Shanghai
digger-manager:
image: hehety/digger:latest
hostname: digger-manager
command: digger manager
networks:
- digger
ports:
- 9012:9012
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
environment:
- TZ=Asia/Shanghai
- DIGGER_DATABASE=postgres://digger:123456@digger-postgres:5432/digger?sslmode=disable
- DIGGER_REDIS=123456@digger-redis:6379#0
- DIGGER_UI_DIR=/var/www/html
- DIGGER_LOG_LEVEL=info
digger-worker1:
image: hehety/digger:latest
hostname: digger-worker1
command: digger worker
networks:
- digger
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
environment:
- TZ=Asia/Shanghai
- DIGGER_ID=1
- DIGGER_MANAGER=http://digger-manager:9012
volumes:
postgres:
redis:
networks:
digger:
driver: overlay
attachable: true