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.

1.7 KB
Raw Blame
# ignore: true
# documentation: https://moodle.org
# slogan: Moodle is the world’s most customisable and trusted eLearning solution that empowers educators to improve our world.
# category: cms
# tags: moodle, elearning, education, lms, cms, open, source, low, code
# logo: svgs/moodle.png
# port: 8080

services:
  mariadb:
    image: mariadb:11.1
    environment:
      - ALLOW_EMPTY_PASSWORD=no
      - MYSQL_ROOT_PASSWORD=$SERVICE_PASSWORD_ROOT
      - MYSQL_DATABASE=bitnami_moodle
      - MYSQL_USER=$SERVICE_USER_MARIADB
      - MYSQL_PASSWORD=$SERVICE_PASSWORD_MARIADB
      - MARIADB_CHARACTER_SET=utf8mb4
      - 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
      - MOODLE_DATABASE_PORT_NUMBER=3306
      - MOODLE_DATABASE_USER=$SERVICE_USER_MARIADB
      - MOODLE_DATABASE_NAME=bitnami_moodle
      - MOODLE_DATABASE_PASSWORD=$SERVICE_PASSWORD_MARIADB
      - ALLOW_EMPTY_PASSWORD=no
      - MOODLE_USERNAME=${MOODLE_USERNAME:-user}
      - MOODLE_PASSWORD=$SERVICE_PASSWORD_MOODLE
      - [email protected]
      - MOODLE_SITE_NAME=${MOODLE_SITE_NAME:-New Site}
    volumes:
      - moodle-data:/bitnami/moodle
      - moodledata-data:/bitnami/moodledata
    healthcheck:
      test:
        - CMD
        - php
        - -r
        - "exit(file_exists('/opt/bitnami/moodle/config.php') ? 0 : 1);"
      interval: 20s
      timeout: 10s
      retries: 5