-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
139 lines (135 loc) · 3.39 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: '2.1'
services:
swoft:
container_name: swoft
image: swoft/swoft
ports:
- "81:80"
- "8099:8099"
volumes:
- ./:/var/www/swoft
stdin_open: true
environment:
- TZ=Asia/Shanghai
tty: true
entrypoint: php /var/www/swoft/bin/swoft server:start
# command: php /var/www/swoft/bin/swoft ws:start
consul:
image: progrium/consul:latest
command: -server -bootstrap -ui-dir /ui
healthcheck:
test: ["CMD-SHELL", "curl -I -s -L http://127.0.0.1:8500 || exit 1"]
interval: 5s
retries: 10
ports:
- 8500:8500
environment:
- TZ=Asia/Shanghai
expose:
- 53
- 8300
- 8301
- 8302
- 8400
- 8500
volumes:
- ./docker-file/DNS/resolv.conf:/etc/resolv.conf
nginx-lb:
build: docker-file/nginx/
depends_on:
consul:
condition: service_healthy
ports:
- 8000:8000
- 8443:8443
- 8001:8001
- 8444:8444
expose:
- 8000
- 8443
- 8001
- 8444
environment:
- TZ=Asia/Shanghai
links:
- consul:consul
command: >
/bin/containerpilot
-config file:///etc/containerpilot/containerpilot.json
nginx -g "daemon off;"
volumes:
- ./docker-file/DNS/resolv.conf:/etc/resolv.conf
kong-database:
image: postgres:9.5
ports:
- "5432:5432"
environment:
- POSTGRES_USER=kong
- POSTGRES_DB=kong
- TZ=Asia/Shanghai
volumes:
- postgresql_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "kong"]
interval: 10s
timeout: 5s
retries: 5
kong-migration:
image: kong
depends_on:
kong-database:
condition: service_healthy
environment:
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
- TZ=Asia/Shanghai
command: kong migrations up
kong:
build: docker-file/kong/
depends_on:
kong-database:
condition: service_healthy
kong-migration:
condition: service_started
environment:
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
- KONG_PG_DATABASE=kong
- KONG_ADMIN_LISTEN=0.0.0.0:8001
- TZ=Asia/Shanghai
expose:
- 8000
- 8001
- 8443
- 8444
volumes:
- ./docker-file/DNS/resolv.conf:/etc/resolv.conf
healthcheck:
test: ["CMD-SHELL", "curl -I -s -L http://127.0.0.1:8000 || exit 1"]
interval: 5s
retries: 10
portainer:
image: portainer/portainer
ports:
- "9000:9000"
command: -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
environment:
- TZ=Asia/Shanghai
DNS:
image: jpillora/dnsmasq
volumes:
- ./docker-file/DNS/dnsmasq.conf:/etc/dnsmasq.conf
ports:
- "53:53/tcp"
- "53:53/udp"
- "5380:8080"
environment:
- TZ=Asia/Shanghai
- HTTP_USER=owlet
- HTTP_PASS=miao
volumes:
portainer_data:
postgresql_data: