Made code more modular and refactored to cmp roles

This commit is contained in:
Kevin Veen-Birkenbach 2025-07-09 20:15:32 +02:00
parent 993469fd82
commit 7a38241485
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
53 changed files with 184 additions and 397 deletions

View File

@ -0,0 +1,11 @@
# Database Docker with Web Proxy
This role builds on `cmp-db-docker` by adding a reverse-proxy frontend for HTTP access to your database service.
## Features
- **Database Composition**
Leverages the `cmp-db-docker` role to stand up your containerized database (PostgreSQL, MariaDB, etc.) with backups and user management.
- **Reverse Proxy**
Includes the `srv-web-proxy-domain` role to configure a proxy (e.g. nginx) for routing HTTP(S) traffic to your database UI or management endpoint.

View File

@ -0,0 +1,15 @@
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: >
Extends cmp-db-docker by adding an HTTP reverse proxy via srv-web-proxy-domain.
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
galaxy_tags:
- docker
- database
- proxy
- compose

View File

@ -0,0 +1,10 @@
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"

View File

@ -0,0 +1,11 @@
# Docker Compose with Web Proxy
This role combines the standard Docker Compose setup with a reverse-proxy for any application.
## Features
- **Docker Compose**
Brings up containers, networks, and volumes via the `docker-compose` role.
- **Reverse Proxy**
Uses the `srv-web-proxy-domain` role to expose your application under a custom domain and port.

View File

@ -0,0 +1,15 @@
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: >
Combines the docker-compose role with srv-web-proxy-domain to
deploy applications behind a reverse proxy.
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
galaxy_tags:
- docker
- compose
- proxy

View File

@ -0,0 +1,10 @@
- name: "include docker-compose role"
include_role:
name: docker-compose
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"

View File

@ -1,2 +1,3 @@
docker_compose_skipp_file_creation: false # If set to true the file creation will be skipped
docker_repository: false # Activates docker repository download and routine
docker_repository: false # Activates docker repository download and routine
docker_compose_flush_handlers: false # Set to true in the vars/main.yml of the including role to autoflush after docker compose routine

View File

@ -7,7 +7,7 @@
# This could lead to problems in docker-compose directories which are based on a git repository
# @todo Verify that this isn't the case. E.g. in accounting
- name: "Create all docker-compose directories (including parent directories)"
- name: "Create all docker-compose directories (including parent directories) for '{{ application_id }}'"
file:
path: "{{ item.value }}"
state: directory
@ -18,4 +18,8 @@
when: docker_repository | bool
- include_tasks: "files.yml"
when: not docker_compose_skipp_file_creation | bool
when: not docker_compose_skipp_file_creation | bool
- name: "flush database, docker and proxy for '{{ application_id }}'"
meta: flush_handlers
when: docker_compose_flush_handlers is not defined

View File

@ -8,9 +8,9 @@ server
{% include 'roles/srv-web-injector-compose/templates/global.includes.conf.j2'%}
{% if nginx_docker_reverse_proxy_extra_configuration is defined %}
{% if proxy_extra_configuration is defined %}
{# Additional Domain Specific Configuration #}
{{nginx_docker_reverse_proxy_extra_configuration}}
{{proxy_extra_configuration}}
{% endif %}
{% include 'roles/net-letsencrypt/templates/ssl_header.j2' %}

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: "include tasks update-repository-with-files.yml"
include_tasks: utils/update-repository-with-files.yml

View File

@ -1,11 +1,4 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy

View File

@ -1,5 +1,3 @@
application_id: "baserow"
database_password: "{{ baserow_database_password }}"
database_type: "postgres"
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
database_type: "postgres"

View File

@ -1,11 +1,4 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy

View File

@ -10,29 +10,9 @@
state: present
when: run_once_docker_discourse is not defined
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
when: run_once_docker_discourse is not defined
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
when: run_once_docker_discourse is not defined
- name: add docker-compose.yml
template:
src: docker-compose.yml.j2
dest: "{{docker_compose.directories.instance}}docker-compose.yml"
notify:
- docker compose up
when: run_once_docker_discourse is not defined
- name: flush, to recreate discourse docker compose
meta: flush_handlers
name: cmp-db-docker-proxy
when: run_once_docker_discourse is not defined
- name: pull docker repository

View File

@ -2,4 +2,5 @@ application_id: "discourse"
database_password: "{{ applications[application_id].credentials.database_password }}"
database_type: "postgres"
docker_repository_directory : "{{docker_compose.directories.services}}{{applications[application_id].repository}}/"
discourse_application_yml_destination: "{{docker_repository_directory }}containers/{{applications[application_id].container}}.yml"
discourse_application_yml_destination: "{{docker_repository_directory }}containers/{{applications[application_id].container}}.yml"
docker_compose_flush_handlers: false

View File

@ -1,18 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "Include setup for domain '{{ domain }}'"
include_role:
name: srv-web-proxy-domain
vars:
ws_path: "/ws"
ws_port: "{{ ports.localhost.websocket[application_id] }}"
client_max_body_size: "100m"
vhost_flavour: "ws_generic"
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: Set OIDC scopes in EspoCRM config (inside web container)
ansible.builtin.shell: |

View File

@ -1,3 +1,6 @@
application_id: "espocrm"
# EspoCRM uses MySQL/MariaDB
database_type: "mariadb"
application_id: "espocrm"
database_type: "mariadb"
ws_path: "/ws"
ws_port: "{{ ports.localhost.websocket[application_id] }}"
client_max_body_size: "100m"
vhost_flavour: "ws_generic"

View File

@ -1,7 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
name: cmp-db-docker-proxy
- name: "create {{ friendica_host_ldap_config }}"
template:
@ -14,13 +14,6 @@
notify: docker compose up
when: applications | is_feature_enabled('ldap',application_id)
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: Build friendica_addons based on features
set_fact:
friendica_addons: >-

View File

@ -1,13 +1,6 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy

View File

@ -1,5 +1,5 @@
application_id: "funkwhale"
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
proxy_extra_configuration: "client_max_body_size 512M;"
database_type: "postgres"
funkwhale_media_root: "/srv/funkwhale/data/"
funkwhale_static_root: "{{funkwhale_media_root}}static"

View File

@ -1,10 +1,3 @@
- name: "include docker-compose role"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: docker-compose
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: Wait for Gitea HTTP endpoint
wait_for:

View File

@ -1,11 +1,4 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy

View File

@ -1,11 +1,4 @@
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
loop: "{{ domains }}"
loop_control:
loop_var: domain

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: "create directory {{import_directory_host}}"
file:

View File

@ -1,10 +1,3 @@
- name: "include docker-compose role"
- name: "include docker and reverse proxy for {{ application_id }} "
include_role:
name: docker-compose
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-docker-proxy

View File

@ -1,24 +1,6 @@
---
- name: "include docker-compose role"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: docker-compose
when: run_once_docker_libretranslate is not defined
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
when: run_once_docker_libretranslate is not defined
- name: run the libretranslate tasks once

View File

@ -1,23 +1,16 @@
---
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: Set nginx_docker_reverse_proxy_extra_configuration based on applications[application_id].public_api_activated
- name: Set proxy_extra_configuration based on applications[application_id].public_api_activated
set_fact:
nginx_docker_reverse_proxy_extra_configuration: >-
proxy_extra_configuration: >-
{% if not applications[application_id].public_api_activated %}
{{ lookup('file', '{{ role_path }}/files/deactivate-public-api.conf') }}
{% else %}
""
{% endif %}
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker-proxy
- name: add config.toml
template:
@ -25,6 +18,8 @@
dest: "{{docker_compose.directories.config}}config.toml"
notify: docker compose up
- meta: flush_handlers
- name: Check if listmonk database is already initialized
command: docker compose exec -T {{database_host}} psql -U {{database_username}} -d {{database_name}} -c "\dt"
register: db_tables

View File

@ -1,16 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
when: run_once_docker_mailu is not defined
- name: "Include role srv-web-proxy-domain for {{ application_id }}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 31M;"
name: cmp-db-docker-proxy
when: run_once_docker_mailu is not defined
- name: "Include the srv-web-proxy-tls-deploy role"

View File

@ -1,14 +1,15 @@
application_id: "mailu"
application_id: "mailu"
# Database Configuration
database_password: "{{applications.mailu.credentials.database_password}}"
database_type: "mariadb"
database_password: "{{applications.mailu.credentials.database_password}}"
database_type: "mariadb"
cert_mount_directory: "{{docker_compose.directories.volumes}}certs/"
cert_mount_directory: "{{docker_compose.directories.volumes}}certs/"
# Use dedicated source for oidc if activated
# @see https://github.com/heviat/Mailu-OIDC/tree/2024.06
docker_source: "{{ 'ghcr.io/heviat' if applications | is_feature_enabled('oidc',application_id) else 'ghcr.io/mailu' }}"
docker_source: "{{ 'ghcr.io/heviat' if applications | is_feature_enabled('oidc',application_id) else 'ghcr.io/mailu' }}"
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
proxy_extra_configuration: "client_max_body_size 31M;"

View File

@ -1,13 +1,6 @@
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: flush docker service
meta: flush_handlers

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose.directories.instance}}docker-compose.yml

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: add config.exs
template:

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: Wait until the Moodle container is healthy
shell: docker inspect --format '{% raw %}{{.State.Health.Status}}{% endraw %}' {{ container_name }}

View File

@ -10,4 +10,4 @@
dest: "{{nginx.directories.http.servers}}{{domains | get_domain(application_id)}}.conf"
notify: restart nginx
vars:
nginx_docker_reverse_proxy_extra_configuration: "sub_filter '{{source_domain}}' '{{domains | get_domain(application_id)}}';"
proxy_extra_configuration: "sub_filter '{{source_domain}}' '{{domains | get_domain(application_id)}}';"

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: "Create {{openproject_plugins_folder}}"
file:

View File

@ -1,14 +1,7 @@
---
- name: "include docker-compose role"
include_role:
name: docker-compose
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "include docker and reverse proxy for '{{ application_id }}'"
include_role:
name: cmp-docker-proxy
- name: "configure pgadmin servers"
include_tasks: configuration.yml

View File

@ -1,10 +1,3 @@
- name: "include docker-compose role"
- name: "include docker and reverse proxy for '{{ application_id }}'"
include_role:
name: docker-compose
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-docker-proxy

View File

@ -1,11 +1,4 @@
---
- name: "include docker-compose role"
- name: "include docker and reverse proxy for '{{ application_id }}'"
include_role:
name: docker-compose
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-docker-proxy

View File

@ -1,11 +1,4 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy

View File

@ -1,3 +1,3 @@
application_id: "pixelfed"
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
proxy_extra_configuration: "client_max_body_size 512M;"
database_type: "mariadb"

View File

@ -1,16 +1,8 @@
---
- name: "include docker-compose role"
- name: "include docker and reverse proxy for '{{ application_id }}'"
include_role:
name: docker-compose
when: run_once_docker_portfolio is not defined
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-docker-proxy
when: run_once_docker_portfolio is not defined
- name: "Check if host-specific config.yaml exists in {{ config_inventory_path }}"

View File

@ -14,16 +14,9 @@
command: pkgmgr path cymais
register: path_cymais_output
- name: "include docker-compose role"
- name: "include docker and reverse proxy for '{{ application_id }}'"
include_role:
name: docker-compose
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-docker-proxy
# Hack because it wasn't possible to fix an handler bug in pkgmgr install
- name: „Trigger“ docker compose up

View File

@ -1,24 +1,7 @@
---
- name: "include docker-compose role"
- name: "load docker and db for {{application_id}}"
include_role:
name: docker-compose
when: run_once_docker_pretix is not defined
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker
when: run_once_docker_pretix is not defined
- name: run the pretix tasks once

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: "Configure Snipe-IT LDAP settings"

View File

@ -11,16 +11,9 @@
command: pkgmgr path cymais-sphinx
register: path_cymais_sphinx_output
- name: "include docker-compose role"
- name: "include docker and reverse proxy for '{{ application_id }}'"
include_role:
name: docker-compose
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-docker-proxy
# Hack because it wasn't possible to fix an handler bug in pkgmgr install
- name: „Trigger“ docker compose up

View File

@ -8,9 +8,9 @@ server
{% include 'roles/srv-web-injector-compose/templates/global.includes.conf.j2'%}
{% if nginx_docker_reverse_proxy_extra_configuration is defined %}
{% if proxy_extra_configuration is defined %}
{# Additional Domain Specific Configuration #}
{{nginx_docker_reverse_proxy_extra_configuration}}
{{proxy_extra_configuration}}
{% endif %}
{% include 'roles/net-letsencrypt/templates/ssl_header.j2' %}

View File

@ -1,14 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy
- name: "copy templates {{ settings_files }} for taiga-contrib-oidc-auth"
template:

View File

@ -10,7 +10,7 @@
loop_control:
loop_var: domain
vars:
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size {{ wordpress_max_upload_size }};"
proxy_extra_configuration: "client_max_body_size {{ wordpress_max_upload_size }};"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "Transfering upload.ini to {{ docker_compose.directories.instance }}"

View File

@ -1,12 +1,5 @@
---
- name: "load docker and db for {{application_id}}"
- name: "load docker, db and proxy for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-db-docker-proxy

View File

@ -1,15 +1,7 @@
---
- name: "include docker-compose role"
- name: "include docker and reverse proxy for '{{ application_id }}'"
include_role:
name: docker-compose
when: run_once_docker_simpleicons is not defined
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
name: cmp-docker-proxy
when: run_once_docker_simpleicons is not defined
- name: "Copy '{{ application_id }}' files"

View File

@ -1,36 +1,21 @@
---
{% if database_type | bool %}
{% raw %}
- name: "load docker and db for {{application_id}}"
# Default: Loading; Docker, Database and Reverse Proxy
- name: "load docker, db and proxy for '{{application_id}}'"
include_role:
name: cmp-db-docker
name: cmp-db-docker-proxy
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
{% endraw %}
{% else %}
{% raw %}
- name: "include docker-compose role"
- name: "load docker, proxy for '{{application_id}}'"
include_role:
name: docker-compose
name: cmp-db-docker-proxy
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
{% endraw %}
{% endif %}
{% raw %}
- name: "include role srv-web-proxy-domain for {{application_id}}"
include_role:
name: srv-web-proxy-domain
vars:
domain: "{{ domains | get_domain(application_id) }}"
http_port: "{{ ports.localhost.http[application_id] }}"
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
- name: run the {% endraw %}{{ application_id }}{% raw %} tasks once
set_fact:
run_once_docker_{% endraw %}{{ application_id }}{% raw %}: true