Added healthcheck to moodle service
This commit is contained in:
parent
503da6da21
commit
42f671cfa2
1 changed files with 18 additions and 2 deletions
|
|
@ -18,9 +18,18 @@ services:
|
||||||
- MARIADB_COLLATE=utf8mb4_unicode_ci
|
- MARIADB_COLLATE=utf8mb4_unicode_ci
|
||||||
volumes:
|
volumes:
|
||||||
- mariadb-data:/var/lib/mysql
|
- mariadb-data:/var/lib/mysql
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- CMD-SHELL
|
||||||
|
- bash -c '</dev/tcp/localhost/3306'
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
moodle:
|
moodle:
|
||||||
image: docker.io/bitnamilegacy/moodle:4.3
|
image: docker.io/bitnamilegacy/moodle:4.3
|
||||||
|
depends_on:
|
||||||
|
- mariadb
|
||||||
environment:
|
environment:
|
||||||
- SERVICE_URL_MOODLE_8080
|
- SERVICE_URL_MOODLE_8080
|
||||||
- MOODLE_DATABASE_HOST=mariadb
|
- MOODLE_DATABASE_HOST=mariadb
|
||||||
|
|
@ -36,5 +45,12 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- moodle-data:/bitnami/moodle
|
- moodle-data:/bitnami/moodle
|
||||||
- moodledata-data:/bitnami/moodledata
|
- moodledata-data:/bitnami/moodledata
|
||||||
depends_on:
|
healthcheck:
|
||||||
- mariadb
|
test:
|
||||||
|
- CMD
|
||||||
|
- php
|
||||||
|
- -r
|
||||||
|
- "exit(file_exists('/opt/bitnami/moodle/config.php') ? 0 : 1);"
|
||||||
|
interval: 20s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue