-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-full.yml
248 lines (232 loc) · 10.4 KB
/
docker-compose-full.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
version: '3.2'
services:
#-------------------------------------------
# ALPINE-BASE
#-------------------------------------------
base:
restart: always
build:
context: ./docker/alpine-base
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- ALPINE_VERSION=${ALPINE_VERSION}
- S6OVERLAY_VERSION=${S6OVERLAY_VERSION}
- S6_BEHAVIOUR_IF_STAGE2_FAILS=${S6_BEHAVIOUR_IF_STAGE2_FAILS}
- LANG=${LANG}
- LC_ALL=${LC_ALL}
- LANGUAGE=${LANGUAGE}
- TERM=${TERM}
#- CONTAINER_HOST= # container host (defaut: hostname of the container)
#- CONTAINER_RESOLVER=route # IP resolver method for container (disable/route/interface, default: route)
#- CONTAINER_RESOLVER_INTERFACENAME=eth0 # network interface name for IP resolver (default: eth0)
#- CONTAINER_RESOLVER_INTERFACETYPE=inet # network interface type for IP resolver (inet/inet6, default: inet)
#-------------------------------------------
# ALPINE-BASE-CONSUL
#-------------------------------------------
base-consul:
restart: always
build:
context: ./docker/alpine-base-consul
ports:
- "9999:9999"
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- CONSULTEMPLATE_VERSION=${CONSULTEMPLATE_VERSION}
#- CONTAINER_RESOLVER=route # IP resolver method for container (route/interface, default: route)
#- CONTAINER_RESOLVER_INTERFACENAME=eth0 # network interface name for IP resolver (default: eth0)
#- CONTAINER_RESOLVER_INTERFACETYPE=inet # network interface type for IP resolver (inet/inet6, default: inet)
- CONSUL_AGENT=172.16.0.1 # agent hostname
- CONSUL_PORT=8500 # agent port
- CONSUL_TLS=0 # enable TLS
#- CONSUL_TLSCAFILE=/etc/consul.d/ssl/ca.pem # TLS CA certificate file
#- CONSUL_TLSCERTFILE=/etc/consul.d/ssl/client.pem # TLS client certificate file
#- CONSUL_TLSKEYFILE=/etc/consul.d/ssl/client-priv-key.pem # TLS client certificate key file
#- CONSUL_TLSSERVERNAME= # SNI server name for validation
#- CONSUL_TLSVERIFY=0 # enable TLS peer verification
#- CONSUL_TOKEN=43480d61-aea9-4a21-9deb-5e68dbc44985 # API token
#- CONSUL_KEYPREFIX=path/prefix/ # keystore prefix path
#- CONSUL_RESOLVER=container # IP resolver method for consul service registration (container/route/interface, by default container)
#- CONSUL_RESOLVER_INTERFACENAME=eth0 # network interface name for IP resolver (default: eth0)
#- CONSUL_RESOLVER_INTERFACETYPE=inet # network interface type for IP resolver (inet/inet6, default: inet)
- CONSUL_SERVICENAME=base-consul # service name to register
#- CONSUL_SERVICETAGS=local,foo # service tags (optional)
- CONSUL_SERVICEPORT=9999 # service port
#- CONSUL_CHECKTYPE=tcp # health check type (none/http/script/tcp/ttl, default: none)
#- CONSUL_CHECKINTERVAL=15s # health check interval
#- CONSUL_DEREGISTERCRITICALSERVICEAFTER=0 # delay after which the service will be deregistered if this check remains critical (0 to disable)
#
# HTTP health check
#
#- CONSUL_CHECKTYPE=http
#- CONSUL_CHECKHTTPURL=http://foo:1234 # HTTP custom URL
#- CONSUL_CHECKHTTPPATH=/ # HTTP path for auto-generated URL (http://<container_ip>:<service_port><path>)
#- CONSUL_CHECKHTTPTLSSKIPVERIFY=0 # skip TLS certificate verification
#- CONSUL_CHECKINTERVAL=15s # check interval
#- CONSUL_DEREGISTERCRITICALSERVICEAFTER=0 # delay after which the service will be deregistered if this check remains critical (0 to disable)
#
# Script health check
#
#- CONSUL_CHECKTYPE=script
#- CONSUL_CHECKSCRIPT=/usr/local/bin/healthcheck.sh # script to execute
#- CONSUL_CHECKDOCKERCONTAINERID= # docker container id
#- CONSUL_CHECKSHELL=/bin/bash # custom shell
#- CONSUL_CHECKINTERVAL=15s # check interval
#- CONSUL_DEREGISTERCRITICALSERVICEAFTER=0 # delay after which the service will be deregistered if this check remains critical (0 to disable)
#
# TCP health check
#
#- CONSUL_CHECKTYPE=tcp
#- CONSUL_CHECKADDR=static # custom TCP address if different from service registration
#- CONSUL_CHECKPORT=5678 # custom TCP port if different from service registration
#- CONSUL_CHECKINTERVAL=15s # check interval
#- CONSUL_DEREGISTERCRITICALSERVICEAFTER=0 # delay after which the service will be deregistered if this check remains critical (0 to disable)
#
# TTL health check
#
#- CONSUL_CHECKTYPE=ttl
#- CONSUL_CHECKTTL=15s # TTL update
#- CONSUL_DEREGISTERCRITICALSERVICEAFTER=0 # delay after which the service will be deregistered if this check remains critical (0 to disable)
#-------------------------------------------
# ALPINE-CONSUL
#-------------------------------------------
consul:
restart: always
build:
context: ./docker/alpine-consul
ports:
- "8500:8500"
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- CONSUL_VERSION=${CONSUL_VERSION}
- CONSULTEMPLATE_VERSION=${CONSULTEMPLATE_VERSION}
- CONSUL_OPTIONS=-server -bootstrap-expect 1 -client 0.0.0.0 -ui # minimal server options
#-------------------------------------------
# ADMINER
#-------------------------------------------
adminer:
restart: always
build:
context: ./docker/adminer/${ADMINER_VERSION}
ports:
- "${ADMINER_PORT}:8080"
volumes:
- /etc/localtime:/etc/localtime:ro
- ${SESSION_ADMINER}:/sessions # volume for data
networks:
- backend
#-------------------------------------------
# PHP 5.x
#-------------------------------------------
php5:
restart: always
depends_on:
- consul
build:
context: ./docker/alpine-php/${PHP5_VERSION}
ports:
- "${PHP5_PORT}:9000"
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- CONSUL_AGENT=consul # consul agent hostname/IP
- CONSUL_SERVICENAME=php5 # consul service name
- CONSUL_SERVICETAGS=dev # consul service tag
- CONSUL_SERVICEPORT=9000 # consul service port
- CONSUL_CHECKTYPE=tcp # consul health check type
- PHP_MANAGER=static # process manager mode (static/dynamic/ondemand)
- PHP_MAXCHILDREN=10 # maximum children (static/ondemand)
- PHP_STATUSPATH=/status # path of status page
- PHP_PINGPATH=/ping # path of ping page
- PHP_ACCESSFORMAT="%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" # access format
- PHP_REQUESTSLOWLOGTIMEOUT=10 # timeout for logging slow requests
- PHP_REQUESTTERMINATETIMEOUT=30 # timeout for killing running processes
networks:
- backend
#-------------------------------------------
# PHP 7.x
#-------------------------------------------
php7:
restart: always
depends_on:
- consul
build:
context: ./docker/alpine-php/${PHP7_VERSION}
ports:
- "${PHP7_PORT}:9000"
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- CONSUL_AGENT=consul # consul agent hostname/IP
- CONSUL_SERVICENAME=php7 # consul service name
- CONSUL_SERVICETAGS=dev # consul service tag
- CONSUL_SERVICEPORT=9000 # consul service port
- CONSUL_CHECKTYPE=tcp # consul health check type
- PHP_MANAGER=static # process manager mode (static/dynamic/ondemand)
- PHP_MAXCHILDREN=10 # maximum children (static/ondemand)
- PHP_STATUSPATH=/status # path of status page
- PHP_PINGPATH=/ping # path of ping page
- PHP_ACCESSFORMAT="%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" # access format
- PHP_REQUESTSLOWLOGTIMEOUT=10 # timeout for logging slow requests
- PHP_REQUESTTERMINATETIMEOUT=30 # timeout for killing running processes
networks:
- backend
#-------------------------------------------
# PHPMYADMIN
#-------------------------------------------
phpmyadmin:
restart: always
depends_on:
- consul
build:
context: ./docker/alpine-phpmyadmin/${PHPMYADMIN_VERSION}
entrypoint: /bin/sh
ports:
- "${PHPMYADMIN_PORT}:8082"
volumes:
- /etc/localtime:/etc/localtime:ro
networks:
- backend
#-------------------------------------------
# RUBY
#-------------------------------------------
ruby:
restart: always
depends_on:
- consul
build:
context: ./docker/alpine-ruby
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- CONSUL_AGENT=consul
networks:
- backend
#-------------------------------------------------------------------
# NETWORK SETUP
#-------------------------------------------------------------------
networks:
backend:
driver: "bridge"
#-------------------------------------------------------------------
# VOLUME SETUP
#-------------------------------------------------------------------
volumes:
base:
driver: "local"
base-consul:
driver: "local"
consul:
driver: "local"
adminer:
driver: "local"
php5:
driver: "local"
php7:
driver: "local"
phpmyadmin:
driver: "local"
ruby:
driver: "local"