Merge pull request #6806 from ShadowArcanist/patch-3

chore(service): Added healthcheck to moodle
This commit is contained in:
Andras Bacsai 2025-10-13 12:50:48 +02:00 committed by GitHub
commit 3e5fb4ae63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,9 +18,18 @@ services:
- MARIADB_COLLATE=utf8mb4_unicode_ci
volumes:
- mariadb-data:/var/lib/mysql
healthcheck:
test:
- CMD-SHELL
- bash -c '</dev/tcp/localhost/3306'
interval: 10s
timeout: 5s
retries: 5
moodle:
image: docker.io/bitnamilegacy/moodle:4.3
depends_on:
- mariadb
environment:
- SERVICE_URL_MOODLE_8080
- MOODLE_DATABASE_HOST=mariadb
@ -36,5 +45,12 @@ services:
volumes:
- moodle-data:/bitnami/moodle
- moodledata-data:/bitnami/moodledata
depends_on:
- mariadb
healthcheck:
test:
- CMD
- php
- -r
- "exit(file_exists('/opt/bitnami/moodle/config.php') ? 0 : 1);"
interval: 20s
timeout: 10s
retries: 5