Solved is_feature_enabled bug and implemented Dockerfile for moodle

This commit is contained in:
2025-05-16 10:22:54 +02:00
parent 52ba4dc3a1
commit 8ffb6a9cee
5 changed files with 26 additions and 12 deletions

View File

@@ -0,0 +1,14 @@
FROM bitnami/moodle:{{ applications[application_id].version }}
{% if applications | is_feature_enabled('oidc',application_id) %}
# Install git (required to clone the OIDC plugin)
USER root
RUN install_packages git unzip
# Clone the Microsoft OIDC plugin into Moodle's auth directory
RUN git clone https://github.com/microsoft/moodle-auth_oidc.git \
/opt/bitnami/moodle/auth/oidc && \
chown -R www-data:www-data /opt/bitnami/moodle/auth/oidc
USER 1001
{% endif %}

View File

@@ -3,7 +3,10 @@ services:
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
moodle:
container_name: {{ container_name }}
image: docker.io/bitnami/moodle:{{applications.moodle.version}}
build:
context: .
dockerfile: Dockerfile
image: moodle_custom
ports:
- 127.0.0.1:{{ports.localhost.http[application_id]}}:8080
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}