Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Added healthcheck to moodle service

ShadowArcanist42f671cfa249
diff --git a/templates/compose/moodle.yaml b/templates/compose/moodle.yaml
index 3a8e02478d..41b7916b9b 100644
--- a/templates/compose/moodle.yaml
+++ b/templates/compose/moodle.yaml
@@ -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