# https://hub.docker.com/r/bitnami/moodle

# open source online Learning Management System widely used at universities, schools, and corporations. It is modular and highly adaptable to any type of online learning

# Login: user/bitnami

name: moodle
services:
  mariadb_moodle:
    container_name: mariadb_moodle
    image: docker.io/bitnami/mariadb:11.4
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
      - MARIADB_USER=bn_moodle
      - MARIADB_DATABASE=bitnami_moodle
      - MARIADB_CHARACTER_SET=utf8mb4
      - MARIADB_COLLATE=utf8mb4_unicode_ci
    volumes:
      - 'mariadb_data:/bitnami/mariadb'
    networks:
      - proxy
  moodle:
    container_name: moodle
    image: docker.io/bitnami/moodle:4.4
    ports:
      - '8089:8080'
      #- '443:8443'
    environment:
      - MOODLE_DATABASE_HOST=mariadb_moodle
      - MOODLE_DATABASE_PORT_NUMBER=3306
      - MOODLE_DATABASE_USER=bn_moodle
      - MOODLE_DATABASE_NAME=bitnami_moodle
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
    volumes:
      - 'moodle_data:/bitnami/moodle'
      - 'moodledata_data:/bitnami/moodledata'
    depends_on:
      - mariadb_moodle
    networks:
      - proxy

networks:
  proxy:
    external: true

volumes:
  mariadb_data:
    driver: local
  moodle_data:
    driver: local
  moodledata_data:
    driver: local
