-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
191 lines (179 loc) · 5.97 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
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
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}
#-------------------------------------------
# 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}
- CONSUL_AGENT=172.16.0.1 # agent hostname
- CONSUL_PORT=8500 # agent port
- CONSUL_TLS=0 # enable TLS
- CONSUL_SERVICENAME=base-consul # service name to register
- CONSUL_SERVICEPORT=9999 # service port
#-------------------------------------------
# ALPINE-CONSUL
#-------------------------------------------
consul:
restart: always
build:
context: ./docker/core-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"