mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-06-25 19:55:31 +02:00
Compare commits
No commits in common. "ceab517dfaf095c27f385c3192e6219d31827ea6" and "f5bacf17b3a5ffeab56f1501e4a1bdbc7e1ccc96" have entirely different histories.
ceab517dfa
...
f5bacf17b3
@ -57,7 +57,6 @@ ports:
|
|||||||
presentation: 8039
|
presentation: 8039
|
||||||
espocrm: 8040
|
espocrm: 8040
|
||||||
syncope: 8041
|
syncope: 8041
|
||||||
collabora: 8042
|
|
||||||
bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port
|
bigbluebutton: 48087 # This port is predefined by bbb. @todo Try to change this to a 8XXX port
|
||||||
# Ports which are exposed to the World Wide Web
|
# Ports which are exposed to the World Wide Web
|
||||||
public:
|
public:
|
||||||
|
@ -84,8 +84,6 @@ defaults_networks:
|
|||||||
subnet: 192.168.103.64/28
|
subnet: 192.168.103.64/28
|
||||||
syncope:
|
syncope:
|
||||||
subnet: 192.168.103.80/28
|
subnet: 192.168.103.80/28
|
||||||
collabora:
|
|
||||||
subnet: 192.168.103.96/28
|
|
||||||
|
|
||||||
# /24 Networks / 254 Usable Clients
|
# /24 Networks / 254 Usable Clients
|
||||||
bigbluebutton:
|
bigbluebutton:
|
||||||
|
@ -28,8 +28,8 @@ defaults_oidc:
|
|||||||
attributes:
|
attributes:
|
||||||
# Attribut to identify the user
|
# Attribut to identify the user
|
||||||
username: "preferred_username"
|
username: "preferred_username"
|
||||||
given_name: "givenName"
|
given_name: "given_name"
|
||||||
family_name: "surname"
|
family_name: "family_name"
|
||||||
email: "email"
|
email: "email"
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
# Docker Collabora (DRAFT)
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
This Ansible role deploys Collabora Online (CODE) in Docker to enable real-time, in-browser document editing for Nextcloud. It automates the setup of the Collabora CODE container, Nginx reverse proxy configuration, network isolation via Docker networks, and environment variable management.
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
* **Dockerized Collabora CODE:** Uses the official `collabora/code` image.
|
|
||||||
* **Nginx Reverse Proxy:** Configures a public-facing proxy with TLS termination and WebSocket support for `/cool/` paths.
|
|
||||||
* **Docker Network Management:** Creates an isolated `/28` subnet for Collabora and connects containers securely.
|
|
||||||
* **Environment Configuration:** Generates a `.env` file with domain, credentials, and extra parameters for Collabora's WOPI server.
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
* Automatic creation of a dedicated Docker network for Collabora.
|
|
||||||
* Proxy configuration template for Nginx with long timeouts and WebSocket upgrades.
|
|
||||||
* Customizable domain names and ports via Ansible variables.
|
|
||||||
* Support for SSL termination at the proxy level.
|
|
||||||
* Integration hooks to restart Nginx and recreate Docker Compose stacks on changes.
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
See the role’s `README.md`, task files, and Jinja2 templates in the `roles/docker-collabora` directory for usage examples and variable definitions.
|
|
||||||
|
|
||||||
## Further Resources
|
|
||||||
|
|
||||||
* [Collabora & Talk Super integration demo](https://www.youtube.com/watch?v=7cRmvTyt1ik)
|
|
||||||
* [Collabora configuration examples archive](https://cloud.thesysadminhub.com/s/FNKyP43y35HGDTJ?dir=/&openfile=true)
|
|
||||||
* [Official Collabora CODE website](https://www.collaboraoffice.com/code/)
|
|
@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
galaxy_info:
|
|
||||||
author: "Kevin Veen-Birkenbach"
|
|
||||||
description: "Deploy Collabora Online CODE in Docker with automated proxy, networking, and environment configuration."
|
|
||||||
license: "CyMaIS NonCommercial License (CNCL)"
|
|
||||||
license_url: "https://s.veen.world/cncl"
|
|
||||||
company: |
|
|
||||||
Kevin Veen-Birkenbach
|
|
||||||
Consulting & Coaching Solutions
|
|
||||||
https://www.veen.world
|
|
||||||
min_ansible_version: "2.9"
|
|
||||||
platforms:
|
|
||||||
- name: Linux
|
|
||||||
versions:
|
|
||||||
- all
|
|
||||||
galaxy_tags:
|
|
||||||
- collabora
|
|
||||||
- docker
|
|
||||||
- nginx
|
|
||||||
- office
|
|
||||||
- wopi
|
|
||||||
- code
|
|
||||||
repository: "https://s.veen.world/cymais"
|
|
||||||
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
|
||||||
documentation: "https://s.veen.world/cymais/docker-collabora"
|
|
||||||
logo:
|
|
||||||
class: "fa-solid fa-file-code"
|
|
||||||
run_after: []
|
|
@ -1,20 +0,0 @@
|
|||||||
- name: create nextcloud nginx proxy configuration file
|
|
||||||
template:
|
|
||||||
src: "nginx.conf.j2"
|
|
||||||
dest: "{{nginx.directories.http.servers}}{{domains | get_domain(application_id)}}.conf"
|
|
||||||
notify: restart nginx
|
|
||||||
|
|
||||||
- name: "Include docker-compose role"
|
|
||||||
include_role:
|
|
||||||
name: docker-compose
|
|
||||||
|
|
||||||
- name: Create Docker network for Collabora
|
|
||||||
docker_network:
|
|
||||||
name: central_mariadb
|
|
||||||
state: present
|
|
||||||
ipam_config:
|
|
||||||
- subnet: "{{ networks.local.collabora.subnet }}"
|
|
||||||
when: run_once_docker_mariadb is not defined
|
|
||||||
|
|
||||||
- include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/create-files.yml"
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
services:
|
|
||||||
|
|
||||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
|
||||||
|
|
||||||
collabora:
|
|
||||||
image: collabora/code
|
|
||||||
container_name: collabora
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
|
||||||
|
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
|
||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
|
@ -1,4 +0,0 @@
|
|||||||
domain=nxsrv
|
|
||||||
username=admin
|
|
||||||
password=${COLLABRA_PASSWORD}
|
|
||||||
extra_params=--o:ssl.enable=false --o:ssl.termination=true
|
|
@ -1,15 +0,0 @@
|
|||||||
server {
|
|
||||||
server_name {{domain}};
|
|
||||||
|
|
||||||
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/nginx-modifier-all/templates/global.includes.conf.j2'%}
|
|
||||||
|
|
||||||
{% include 'roles/nginx-docker-reverse-proxy/templates/headers/content_security_policy.conf.j2' %}
|
|
||||||
|
|
||||||
{% include 'roles/nginx-docker-reverse-proxy/templates/location/proxy_basic.conf.j2' %}
|
|
||||||
|
|
||||||
{% set location = '^~ /cool/' %}
|
|
||||||
|
|
||||||
{% include 'roles/nginx-docker-reverse-proxy/templates/location/proxy_basic.conf.j2' %}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
domains:
|
|
||||||
canonical:
|
|
||||||
- "collabora.{{ primary_domain }}"
|
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
application_id: collabora
|
|
@ -16,8 +16,6 @@ csp:
|
|||||||
flags:
|
flags:
|
||||||
script-src-elem:
|
script-src-elem:
|
||||||
unsafe-inline: true
|
unsafe-inline: true
|
||||||
script-src:
|
|
||||||
unsafe-inline: true
|
|
||||||
style-src:
|
style-src:
|
||||||
unsafe-inline: true
|
unsafe-inline: true
|
||||||
domains:
|
domains:
|
||||||
|
@ -25,7 +25,7 @@ services:
|
|||||||
interval: 1m
|
interval: 1m
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
{% if bridges | length > 0 %}
|
{% if bridges | bool %}
|
||||||
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
|
||||||
{% for item in bridges %}
|
{% for item in bridges %}
|
||||||
mautrix-{{item.bridge_name}}:
|
mautrix-{{item.bridge_name}}:
|
||||||
|
@ -1,36 +1,6 @@
|
|||||||
# Administration
|
# Administration
|
||||||
|
|
||||||
## Moodle Docker Directory Path
|
# Radical Erase of Setup
|
||||||
|
|
||||||
Moodle lives in: ``cd /opt/docker/moodle``
|
|
||||||
|
|
||||||
## Upgrade
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker exec --user daemon moodle php /opt/bitnami/moodle/admin/cli/upgrade.php --non-interactive
|
|
||||||
```
|
|
||||||
|
|
||||||
## Delete Cache
|
|
||||||
|
|
||||||
To clean the cache execute:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker exec --user daemon moodle php /opt/bitnami/moodle/admin/cli/purge_caches.php
|
|
||||||
docker exec --user root moodle rm -rf \
|
|
||||||
/bitnami/moodledata/cache/* \
|
|
||||||
/bitnami/moodledata/localcache/* \
|
|
||||||
/bitnami/moodledata/temp/* \
|
|
||||||
/bitnami/moodledata/sessions/*
|
|
||||||
docker restart moodle
|
|
||||||
```
|
|
||||||
|
|
||||||
## CLI
|
|
||||||
|
|
||||||
A detailled Guid how to use the CLI in moodle you will find [here](https://docs.moodle.org/500/de/Administration_%C3%BCber_Kommandozeile).
|
|
||||||
|
|
||||||
## General Administration Tasks
|
|
||||||
|
|
||||||
### Radical Erase of Setup
|
|
||||||
To manually erase the full moodle setup inkluding all data execute:
|
To manually erase the full moodle setup inkluding all data execute:
|
||||||
|
|
||||||
**CLI:**
|
**CLI:**
|
||||||
@ -54,5 +24,5 @@ DROP DATABASE IF EXISTS moodle;
|
|||||||
|
|
||||||
to delete all data in the database related to this role.
|
to delete all data in the database related to this role.
|
||||||
|
|
||||||
### Virgin Setup
|
# Virgin Setup
|
||||||
After the installation you can rerun this role to create a fresh setup of Moodle.
|
After the installation you can rerun this role to create a fresh setup of Moodle.
|
@ -19,5 +19,4 @@ galaxy_info:
|
|||||||
documentation: "https://s.veen.world/cymais"
|
documentation: "https://s.veen.world/cymais"
|
||||||
logo:
|
logo:
|
||||||
class: "fa-solid fa-graduation-cap"
|
class: "fa-solid fa-graduation-cap"
|
||||||
run_after:
|
dependencies: []
|
||||||
- "docker-keycloak"
|
|
@ -12,26 +12,6 @@
|
|||||||
|
|
||||||
- include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/create-files.yml"
|
- include_tasks: "{{ playbook_dir }}/roles/docker-compose/tasks/create-files.yml"
|
||||||
|
|
||||||
- name: Wait until the Moodle container is healthy
|
|
||||||
shell: docker inspect --format '{% raw %}{{.State.Health.Status}}{% endraw %}' {{ container_name }}
|
|
||||||
register: health_check
|
|
||||||
until: health_check.stdout.strip() == "healthy"
|
|
||||||
retries: 120
|
|
||||||
delay: 5
|
|
||||||
|
|
||||||
- name: "Include ownership settings tasks for moodle"
|
|
||||||
include_tasks: ownership.yml
|
|
||||||
|
|
||||||
- name: "Configure OIDC login for Moodle if enabled"
|
- name: "Configure OIDC login for Moodle if enabled"
|
||||||
include_tasks: oidc.yml
|
include_tasks: oidc.yml
|
||||||
when: applications | is_feature_enabled('oidc',application_id)
|
when: applications | is_feature_enabled('oidc',application_id)
|
||||||
|
|
||||||
- name: Run Moodle system check
|
|
||||||
command: >
|
|
||||||
docker exec --user {{ bitnami_user }} {{ container_name }}
|
|
||||||
php /opt/bitnami/moodle/admin/cli/checks.php
|
|
||||||
register: moodle_checks
|
|
||||||
changed_when: false
|
|
||||||
failed_when: >
|
|
||||||
moodle_checks.rc != 0 or
|
|
||||||
"OK: All" not in moodle_checks.stdout
|
|
||||||
|
@ -1,60 +1,24 @@
|
|||||||
---
|
---
|
||||||
|
- name: "Upgrade Moodle to apply OIDC plugin"
|
||||||
- name: Check if OIDC plugin is present in container
|
command: "docker exec {{ container_name }} php admin/cli/upgrade.php --non-interactive"
|
||||||
command: >
|
|
||||||
docker exec --user root {{ container_name }} test -d {{ bitnami_oidc_plugin_dir }}
|
|
||||||
register: oidc_plugin_check
|
|
||||||
ignore_errors: true
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: Fail if plugin not present to avoid broken auth
|
|
||||||
fail:
|
|
||||||
msg: "OIDC plugin not present – skipping configuration"
|
|
||||||
when: oidc_plugin_check.rc != 0
|
|
||||||
|
|
||||||
#- name: "Upgrade Moodle to apply OIDC plugin"
|
|
||||||
# command: "docker exec --user {{ bitnami_user }} {{ container_name }} php /opt/bitnami/moodle/admin/cli/upgrade.php --non-interactive"
|
|
||||||
#
|
|
||||||
#- name: Clear Moodle cache
|
|
||||||
# command: >
|
|
||||||
# docker exec --user {{ bitnami_user }} {{ container_name }} php /opt/bitnami/moodle/admin/cli/purge_caches.php
|
|
||||||
|
|
||||||
- name: "Set Moodle OIDC configuration via CLI"
|
- name: "Set Moodle OIDC configuration via CLI"
|
||||||
loop:
|
loop:
|
||||||
- { name: "idptype", value: 3 }
|
- { name: "issuerurl", value: "{{ oidc.client.issuer_url }}" }
|
||||||
- { name: "clientauthmethod", value: 1 }
|
|
||||||
- { name: "clientid", value: "{{ oidc.client.id }}" }
|
- { name: "clientid", value: "{{ oidc.client.id }}" }
|
||||||
- { name: "clientsecret", value: "{{ oidc.client.secret }}" }
|
- { name: "clientsecret", value: "{{ oidc.client.secret }}" }
|
||||||
- { name: "opname", value: "{{oidc.button_text}}" }
|
- { name: "authmethod", value: "oidc" }
|
||||||
- { name: "oidcscope", value: "openid profile email" }
|
- { name: "loginflow", value: "authorization_code" }
|
||||||
- { name: "authendpoint", value: "{{ oidc.client.authorize_url }}" }
|
- { name: "idpname", value: "Keycloak" }
|
||||||
|
- { name: "scopes", value: "openid profile email" }
|
||||||
|
- { name: "authenticationendpoint", value: "{{ oidc.client.authorize_url }}" }
|
||||||
- { name: "tokenendpoint", value: "{{ oidc.client.token_url }}" }
|
- { name: "tokenendpoint", value: "{{ oidc.client.token_url }}" }
|
||||||
- { name: "bindingusernameclaim", value: "{{ oidc.attributes.username }}" }
|
- { name: "userinfoendpoint", value: "{{ oidc.client.user_info_url }}" }
|
||||||
- { name: "single_sign_off", value: 1 } # Logs the user out from the IDP
|
|
||||||
- { name: "logouturi", value: "{{ oidc.client.logout_url }}" }
|
|
||||||
- { name: "icon", value: "moodle:t/lock" }
|
|
||||||
- { name: "field_map_firstname", value: "{{ oidc.attributes.given_name }}" }
|
|
||||||
- { name: "field_lock_firstname", value: "locked" }
|
|
||||||
- { name: "field_map_lastname", value: "{{ oidc.attributes.family_name }}" }
|
|
||||||
- { name: "field_lock_lastname", value: "locked" }
|
|
||||||
- { name: "field_map_email", value: "locked" }
|
|
||||||
#- { name: "showloginform", value: 0 } # Deactivate if OIDC is active
|
|
||||||
- { name: "alternateloginurl", value: "{{ web_protocol }}://{{ domains | get_domain(application_id) }}/auth/oidc/" }
|
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
command: >
|
command: >
|
||||||
docker exec --user {{ bitnami_user }} {{ container_name }} php /opt/bitnami/moodle/admin/cli/cfg.php --component=auth_oidc
|
docker exec {{ container_name }} php admin/cli/cfg.php --component=auth_oidc
|
||||||
--name={{ item.name }} --set="{{ item.value }}"
|
--name={{ item.name }} --set="{{ item.value }}"
|
||||||
|
|
||||||
- name: "Enable OIDC login"
|
- name: "Enable OIDC login"
|
||||||
command: "docker exec --user {{ bitnami_user }} {{ container_name }} php /opt/bitnami/moodle/admin/cli/cfg.php --name=auth --set=oidc"
|
command: "docker exec {{ container_name }} php admin/cli/cfg.php --name=auth --set=oidc"
|
||||||
|
|
||||||
- name: Set auth = 'oidc' for all users except guest
|
|
||||||
shell: >
|
|
||||||
docker exec {{ database_instance }} mariadb -u {{ database_username }} -p{{ database_password }}
|
|
||||||
-e "UPDATE moodle.mdl_user SET auth = 'oidc' WHERE username != 'guest';"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
|
|
||||||
#- name: Prevent Account Creation
|
|
||||||
# command: docker exec --user {{ bitnami_user }} {{ container_name }} php /opt/bitnami/moodle/admin/cli/cfg.php --name=authpreventaccountcreation --set=1
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
# This file sets the correct ownership rights for Moodle volumes
|
|
||||||
|
|
||||||
- name: Set ownership and permissions on Moodle directories
|
|
||||||
vars:
|
|
||||||
moodle_dirs:
|
|
||||||
- "{{ bitnami_code_dir }}"
|
|
||||||
- "{{ bitnami_data_dir }}"
|
|
||||||
block:
|
|
||||||
- name: Ensure ownership is correct
|
|
||||||
command: "docker exec --user root {{ container_name }} chown -R {{ bitnami_user_group }} {{ item }}"
|
|
||||||
loop: "{{ moodle_dirs }}"
|
|
||||||
|
|
||||||
- name: Set directory permissions (770)
|
|
||||||
command: "docker exec --user root {{ container_name }} find {{ item }} -type d -exec chmod 770 {} \\;"
|
|
||||||
loop: "{{ moodle_dirs }}"
|
|
||||||
|
|
||||||
- name: Set file permissions (660)
|
|
||||||
command: "docker exec --user root {{ container_name }} find {{ item }} -type f -exec chmod 660 {} \\;"
|
|
||||||
loop: "{{ moodle_dirs }}"
|
|
@ -1,16 +1,14 @@
|
|||||||
FROM bitnami/moodle:{{ applications[application_id].version }}
|
FROM bitnami/moodle:{{ applications[application_id].version }}
|
||||||
|
|
||||||
{% if applications | is_feature_enabled('oidc', application_id) %}
|
{% if applications | is_feature_enabled('oidc',application_id) %}
|
||||||
RUN install_packages unzip curl jq \
|
# Install git (required to clone the OIDC plugin)
|
||||||
&& VERSION=$(curl -s https://api.github.com/repos/microsoft/moodle-auth_oidc/tags \
|
USER root
|
||||||
| jq -r '.[].name' \
|
RUN install_packages git unzip
|
||||||
| grep v{{ applications[application_id].version }} \
|
|
||||||
| sort -Vr \
|
# Clone the Microsoft OIDC plugin into Moodle's auth directory
|
||||||
| head -n1) \
|
RUN git clone https://github.com/microsoft/moodle-auth_oidc.git \
|
||||||
&& echo "Using version $VERSION" \
|
/opt/bitnami/moodle/auth/oidc && \
|
||||||
&& curl -L -o /tmp/oidc.zip https://github.com/microsoft/moodle-auth_oidc/archive/refs/tags/${VERSION}.zip \
|
chown -R www-data:www-data /opt/bitnami/moodle/auth/oidc
|
||||||
&& unzip /tmp/oidc.zip -d /tmp \
|
|
||||||
&& mv /tmp/moodle-auth_oidc-* {{ bitnami_oidc_plugin_dir }} \
|
USER 1001
|
||||||
&& chown -R {{ bitnami_user_group }} {{ bitnami_oidc_plugin_dir }} \
|
|
||||||
&& rm -rf /tmp/oidc.zip
|
|
||||||
{% endif %}
|
{% endif %}
|
@ -11,8 +11,8 @@ services:
|
|||||||
- 127.0.0.1:{{ports.localhost.http[application_id]}}:8080
|
- 127.0.0.1:{{ports.localhost.http[application_id]}}:8080
|
||||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
||||||
volumes:
|
volumes:
|
||||||
- 'code:{{ bitnami_code_link }}'
|
- 'moodle:/bitnami/moodle'
|
||||||
- 'data:{{ bitnami_data_dir }}'
|
- 'data:/bitnami/moodledata'
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET / HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"]
|
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/8080 && echo -e 'GET / HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && cat <&3 | grep -q 'HTTP/1.1'"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@ -22,7 +22,7 @@ services:
|
|||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||||
|
|
||||||
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
{% include 'templates/docker/compose/volumes.yml.j2' %}
|
||||||
code:
|
moodle:
|
||||||
data:
|
data:
|
||||||
|
|
||||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
{% include 'templates/docker/compose/networks.yml.j2' %}
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
|
MOODLE_DATABASE_HOST={{database_host}}
|
||||||
# General
|
MOODLE_DATABASE_PORT_NUMBER={{database_port}}
|
||||||
|
MOODLE_DATABASE_USER={{database_username}}
|
||||||
|
MOODLE_DATABASE_NAME={{database_name}}
|
||||||
|
MOODLE_DATABASE_PASSWORD={{database_password}}
|
||||||
|
ALLOW_EMPTY_PASSWORD=no
|
||||||
MOODLE_SITE_NAME="{{applications[application_id].site_titel}}"
|
MOODLE_SITE_NAME="{{applications[application_id].site_titel}}"
|
||||||
MOODLE_HOST="{{ domains | get_domain(application_id) }}"
|
|
||||||
MOODLE_SSLPROXY=yes
|
MOODLE_SSLPROXY=yes
|
||||||
MOODLE_REVERSE_PROXY=yes
|
MOODLE_REVERSE_PROXY=yes
|
||||||
MOODLE_USERNAME={{applications[application_id].users.administrator.username}}
|
MOODLE_USERNAME={{applications[application_id].users.administrator.username}}
|
||||||
@ -9,15 +12,8 @@ MOODLE_PASSWORD={{applications[application_id].credentials.user_password}}
|
|||||||
MOODLE_EMAIL={{applications[application_id].users.administrator.email}}
|
MOODLE_EMAIL={{applications[application_id].users.administrator.email}}
|
||||||
BITNAMI_DEBUG={% if enable_debug | bool %}true{% else %}false{% endif %}
|
BITNAMI_DEBUG={% if enable_debug | bool %}true{% else %}false{% endif %}
|
||||||
|
|
||||||
# Database
|
|
||||||
MOODLE_DATABASE_HOST={{database_host}}
|
|
||||||
MOODLE_DATABASE_PORT_NUMBER={{database_port}}
|
|
||||||
MOODLE_DATABASE_USER={{database_username}}
|
|
||||||
MOODLE_DATABASE_NAME={{database_name}}
|
|
||||||
MOODLE_DATABASE_PASSWORD={{database_password}}
|
|
||||||
|
|
||||||
# SMTP
|
MOODLE_HOST={{ system_email.host }}
|
||||||
MOODLE_SMTP_HOST={{ system_email.host }}
|
|
||||||
MOODLE_SMTP_PORT_NUMBER={{ system_email.port }}
|
MOODLE_SMTP_PORT_NUMBER={{ system_email.port }}
|
||||||
MOODLE_SMTP_USER={{ users['no-reply'].email }}
|
MOODLE_SMTP_USER={{ users['no-reply'].email }}
|
||||||
MOODLE_SMTP_PASSWORD={{ users['no-reply'].mailu_token }}
|
MOODLE_SMTP_PASSWORD={{ users['no-reply'].mailu_token }}
|
||||||
|
@ -3,23 +3,20 @@ users:
|
|||||||
administrator:
|
administrator:
|
||||||
username: "{{users.administrator.username}}"
|
username: "{{users.administrator.username}}"
|
||||||
email: "{{users.administrator.email}}"
|
email: "{{users.administrator.email}}"
|
||||||
version: "4.5" # Latest LTS - Necessary for OIDC
|
version: "latest"
|
||||||
features:
|
features:
|
||||||
matomo: true
|
matomo: true
|
||||||
css: false
|
css: false
|
||||||
portfolio_iframe: false
|
portfolio_iframe: false
|
||||||
central_database: true
|
central_database: true
|
||||||
oidc: true
|
oidc: false
|
||||||
csp:
|
csp:
|
||||||
flags:
|
flags:
|
||||||
script-src-elem:
|
script-src-elem:
|
||||||
unsafe-inline: true
|
unsafe-inline: true
|
||||||
unsafe-eval: true
|
unsafe-eval: true
|
||||||
script-src:
|
|
||||||
unsafe-eval: true
|
|
||||||
style-src:
|
style-src:
|
||||||
unsafe-inline: true
|
unsafe-inline: true
|
||||||
unsafe-eval: true
|
|
||||||
whitelist:
|
whitelist:
|
||||||
font-src:
|
font-src:
|
||||||
- "data:"
|
- "data:"
|
||||||
|
@ -2,9 +2,3 @@
|
|||||||
application_id: "moodle"
|
application_id: "moodle"
|
||||||
database_type: "mariadb"
|
database_type: "mariadb"
|
||||||
container_name: "{{ application_id }}"
|
container_name: "{{ application_id }}"
|
||||||
bitnami_code_link: "/bitnami/moodle"
|
|
||||||
bitnami_code_dir: "/opt{{bitnami_code_link}}"
|
|
||||||
bitnami_data_dir: "/bitnami/moodledata"
|
|
||||||
bitnami_oidc_plugin_dir: "{{ bitnami_code_dir }}/auth/oidc"
|
|
||||||
bitnami_user: "daemon"
|
|
||||||
bitnami_user_group: "{{ bitnami_user }}:{{ bitnami_user }}"
|
|
@ -1,2 +0,0 @@
|
|||||||
# Todo
|
|
||||||
- Implement Collabora and Talk Supper . [See](https://www.youtube.com/watch?v=7cRmvTyt1ik)
|
|
@ -28,7 +28,3 @@ galaxy_info:
|
|||||||
documentation: "https://s.veen.world/cymais/docker-nextcloud"
|
documentation: "https://s.veen.world/cymais/docker-nextcloud"
|
||||||
logo:
|
logo:
|
||||||
class: "fa-solid fa-cloud"
|
class: "fa-solid fa-cloud"
|
||||||
run_after:
|
|
||||||
- docker-collabora
|
|
||||||
- docker-keycloak
|
|
||||||
- docker-mastodon
|
|
||||||
|
@ -20,28 +20,6 @@ services:
|
|||||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||||
ipv4_address: 192.168.102.69
|
ipv4_address: 192.168.102.69
|
||||||
|
|
||||||
# @Todo activate
|
|
||||||
#nc-talk:
|
|
||||||
# image: nextcloud/aio-talk:latest
|
|
||||||
# container_name: talk_hpb
|
|
||||||
# hostname: hpb_yt
|
|
||||||
# restart: unless-stopped
|
|
||||||
# init: true
|
|
||||||
# ports:
|
|
||||||
# - 3478:3478/tcp #TURN TCP
|
|
||||||
# - 3478:3478/udp #TURN UDP
|
|
||||||
# - 8181:8081/tcp #Signaling
|
|
||||||
# environment:
|
|
||||||
# - NC_DOMAIN=cloud.yourdomain.tld
|
|
||||||
# - TALK_HOST=signaling.yourdomain.tld
|
|
||||||
# - TURN_SECRET=${TURN_SECRET}
|
|
||||||
# - SIGNALING_SECRET=${SIGNALING_SECRET}
|
|
||||||
# - TZ=Europe/Berlin
|
|
||||||
# - TALK_PORT=3478
|
|
||||||
# - INTERNAL_SECRET=${INTERNAL_SECRET}
|
|
||||||
# networks:
|
|
||||||
# - nxnetwork_yt
|
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
container_name: {{applications.nextcloud.container.proxy}}
|
container_name: {{applications.nextcloud.container.proxy}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{# This is the nginx configuration file for the proxy server #}
|
# This is the nginx configuration file for the proxy server
|
||||||
|
|
||||||
server
|
server
|
||||||
{
|
{
|
||||||
|
@ -36,7 +36,6 @@ legacy_login_mask:
|
|||||||
container:
|
container:
|
||||||
application: "nextcloud-application" # Nextcloud application container name
|
application: "nextcloud-application" # Nextcloud application container name
|
||||||
proxy: "nextcloud-web" # Nextcloud Proxy Container Name
|
proxy: "nextcloud-web" # Nextcloud Proxy Container Name
|
||||||
collabora: "nextcloud-collabora"
|
|
||||||
performance:
|
performance:
|
||||||
php:
|
php:
|
||||||
memory_limit: "{{ ((ansible_memtotal_mb | int) / 30)|int }}M" # Dynamic set memory limit
|
memory_limit: "{{ ((ansible_memtotal_mb | int) / 30)|int }}M" # Dynamic set memory limit
|
||||||
|
@ -26,4 +26,3 @@ galaxy_info:
|
|||||||
class: "fa-solid fa-database"
|
class: "fa-solid fa-database"
|
||||||
run_after:
|
run_after:
|
||||||
- docker-matomo
|
- docker-matomo
|
||||||
- docker-keycloak
|
|
||||||
|
@ -26,4 +26,3 @@ galaxy_info:
|
|||||||
run_after:
|
run_after:
|
||||||
- docker-ldap
|
- docker-ldap
|
||||||
- docker-matomo
|
- docker-matomo
|
||||||
- docker-keycloak
|
|
||||||
|
@ -28,4 +28,3 @@ galaxy_info:
|
|||||||
run_after:
|
run_after:
|
||||||
- docker-mariadb
|
- docker-mariadb
|
||||||
- docker-matomo
|
- docker-matomo
|
||||||
- docker-keycloak
|
|
@ -28,7 +28,4 @@ galaxy_info:
|
|||||||
documentation: "https://s.veen.world/cymais"
|
documentation: "https://s.veen.world/cymais"
|
||||||
logo:
|
logo:
|
||||||
class: "fa-solid fa-tasks"
|
class: "fa-solid fa-tasks"
|
||||||
run_after:
|
dependencies: []
|
||||||
- docker-postgres
|
|
||||||
- docker-matomo
|
|
||||||
- docker-keycloak
|
|
||||||
|
@ -25,7 +25,4 @@ galaxy_info:
|
|||||||
documentation: "https://s.veen.world/cymais"
|
documentation: "https://s.veen.world/cymais"
|
||||||
logo:
|
logo:
|
||||||
class: "fa-solid fa-link"
|
class: "fa-solid fa-link"
|
||||||
run_after:
|
dependencies: []
|
||||||
- docker-mariadb
|
|
||||||
- docker-matomo
|
|
||||||
- docker-keycloak
|
|
@ -63,7 +63,7 @@
|
|||||||
(current_play_domains |
|
(current_play_domains |
|
||||||
combine(
|
combine(
|
||||||
current_play_domain_mappings_redirect |
|
current_play_domain_mappings_redirect |
|
||||||
items2dict(key_name='source', value_name='source'),
|
items2dict(key_name='target', value_name='source'),
|
||||||
recursive=True
|
recursive=True
|
||||||
)) |
|
)) |
|
||||||
generate_all_domains(
|
generate_all_domains(
|
||||||
|
@ -87,17 +87,6 @@ class TestDomainMappings(unittest.TestCase):
|
|||||||
result = self.filter.domain_mappings(apps, self.primary)
|
result = self.filter.domain_mappings(apps, self.primary)
|
||||||
self.assertCountEqual(result, expected)
|
self.assertCountEqual(result, expected)
|
||||||
|
|
||||||
def test_multiple_aliases(self):
|
|
||||||
apps = {
|
|
||||||
'app1': {'domains': {'aliases': ['a1.com','a2.com']}}
|
|
||||||
}
|
|
||||||
expected = [
|
|
||||||
{'source': 'a1.com', 'target': 'app1.example.com'},
|
|
||||||
{'source': 'a2.com', 'target': 'app1.example.com'}
|
|
||||||
]
|
|
||||||
result = self.filter.domain_mappings(apps, self.primary)
|
|
||||||
self.assertCountEqual(result, expected)
|
|
||||||
|
|
||||||
def test_invalid_aliases_type(self):
|
def test_invalid_aliases_type(self):
|
||||||
apps = {
|
apps = {
|
||||||
'app1': {'domains': {'aliases': 123}}
|
'app1': {'domains': {'aliases': 123}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user