Implemented draft for moddle

This commit is contained in:
Kevin Veen-Birkenbach 2024-01-18 20:54:20 +01:00
parent ddf87feb42
commit 3b78cc1604
3 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,12 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
- name: add docker-compose.yml
template:
src: "docker-compose.yml.j2"
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
notify: docker compose project setup

View File

@ -0,0 +1,27 @@
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
moodle:
image: docker.io/bitnami/moodle:latest
ports:
- '80:8080'
- '443:8443'
environment:
- MOODLE_DATABASE_HOST={{database_host}}
- MOODLE_DATABASE_PORT_NUMBER=3306
- MOODLE_DATABASE_USER={{database_username}}
- MOODLE_DATABASE_NAME={{database_name}}
- ALLOW_EMPTY_PASSWORD=no
volumes:
- 'moodle:/bitnami/moodle'
- 'data:/bitnami/moodledata'
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
moodle:
data:
{% include 'templates/docker-compose-networks.yml.j2' %}

View File

@ -0,0 +1,4 @@
---
docker_compose_project_name: "moodle"
database_password: "{{moodle_database_password}}"
database_type: "mariadb"