mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-26 12:05:09 +01:00
Implemented draft for moddle
This commit is contained in:
parent
ddf87feb42
commit
3b78cc1604
12
roles/docker-moodle/tasks/main.yml
Normal file
12
roles/docker-moodle/tasks/main.yml
Normal 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
|
27
roles/docker-moodle/templates/docker-compose.yml.j2
Normal file
27
roles/docker-moodle/templates/docker-compose.yml.j2
Normal 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' %}
|
||||
|
4
roles/docker-moodle/vars/main.yml
Normal file
4
roles/docker-moodle/vars/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
docker_compose_project_name: "moodle"
|
||||
database_password: "{{moodle_database_password}}"
|
||||
database_type: "mariadb"
|
Loading…
Reference in New Issue
Block a user