Skip to content

Commit a8082ef

Browse files
committed
Add healthchecks for memcached and adminer services
1 parent 90341bd commit a8082ef

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ services:
185185
command: ["-m", "128"]
186186
expose:
187187
- "11211"
188+
healthcheck:
189+
test: ["CMD", "sh", "-c", "echo stats | nc localhost 11211"]
190+
interval: 30s
191+
timeout: 10s
192+
retries: 3
188193

189194
memcached-sessions:
190195
image: memcached:1-alpine
@@ -194,6 +199,11 @@ services:
194199
command: ["-m", "128"]
195200
expose:
196201
- "11211"
202+
healthcheck:
203+
test: ["CMD", "sh", "-c", "echo stats | nc localhost 11211"]
204+
interval: 30s
205+
timeout: 10s
206+
retries: 3
197207

198208
adminer:
199209
image: adminer
@@ -209,6 +219,11 @@ services:
209219
- ./config/adminer/mysql-socket.ini:/usr/local/etc/php/conf.d/mysql-socket.ini
210220
# MySQL socket to prevent transferring data through TCP
211221
- ./private/mysqld:/var/run/mysqld
222+
healthcheck:
223+
test: ["CMD", "curl", "-f", "http://localhost:8080"]
224+
interval: 30s
225+
timeout: 10s
226+
retries: 5
212227

213228
logging:
214229
driver: json-file

0 commit comments

Comments
 (0)