mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-19 04:15:57 +00:00
Added healthcheck to moodle service
This commit is contained in:
1 parent
503da6da21
commit
42f671cfa2
1 file changed
+18
-2
@@ -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
|
||||||
Reference in new issue
Block a user