Restructured code and matrix rol

This commit is contained in:
Kevin Veen-Birkenbach 2024-01-19 15:12:18 +01:00
parent 0aebca62f6
commit c4209f0559
64 changed files with 249 additions and 224 deletions

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,7 +2,7 @@ version: '3.7'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
image: docker.io/akaunting/akaunting:{{version_akaunting}}
@ -17,10 +17,10 @@ services:
- env/run.env
environment:
- AKAUNTING_SETUP
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
docker_compose_project_name: "akaunting"
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker/compose/backup.yml"
database_type: "mariadb"
database_password: "{{akaunting_database_password}}"
repository_address: "https://github.com/akaunting/docker.git"

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- name: "include docker/compose/database.yml"
include_tasks: docker/compose/database.yml
- name: "include tasks to receive attendize certbot certificate"
include_tasks: recieve-certbot-certificate.yml

View File

@ -1,9 +1,9 @@
version: '3.2'
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
web:
image: attendize_web:latest
@ -12,18 +12,18 @@ services:
volumes:
- .:/usr/share/nginx/html
- .:/var/www
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
maildev:
worker:
env_file:
- ./.env
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
worker:
image: attendize_worker:latest
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
maildev:
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
volumes:
- .:/usr/share/nginx/html
- .:/var/www
@ -32,10 +32,10 @@ services:
image: maildev/maildev
ports:
- "{{ mail_interface_http_port }}:1080"
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
redis:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,7 +1,7 @@
---
docker_compose_project_name: "attendize"
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker/compose/backup.yml"
mail_interface_domain: "mail.{{domain}}"
database_type: "mariadb"
database_password: "{{attendize_database_password}}"

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,9 +2,9 @@ version: '2'
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
image: baserow/baserow:1.19.1
@ -23,11 +23,11 @@ services:
interval: 1m
timeout: 10s
retries: 3
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
redis:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-common.yml"
include_tasks: docker-compose-common.yml
- name: "include docker/compose/common.yml"
include_tasks: docker/compose/common.yml
- name: "include task certbot-matomo.yml"
include_tasks: certbot-matomo.yml

View File

@ -6,8 +6,8 @@
name: which
state: present
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,11 +2,11 @@ version: '3.8'
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
redis:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,7 +2,7 @@ version: "3"
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
celeryworker:
restart: {{docker_restart_policy}}
@ -13,8 +13,8 @@ services:
- C_FORCE_ROOT=true
volumes:
- "data:${MEDIA_ROOT}"
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
celerybeat:
@ -22,8 +22,8 @@ services:
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
api:
restart: {{docker_restart_policy}}
@ -35,8 +35,8 @@ services:
#- "${STATIC_ROOT}:${STATIC_ROOT}"
ports:
- "5000"
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
front:
restart: {{docker_restart_policy}}
@ -54,10 +54,10 @@ services:
ports:
# override those variables in your .env file if needed
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
{% 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' %}
data:
redis:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,7 +2,7 @@ version: '3'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
logging:
@ -35,10 +35,10 @@ services:
interval: 1m
timeout: 10s
retries: 3
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -1,9 +1,9 @@
version: '3.6'
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
web:
image: 'gitlab/gitlab-ee:latest'
@ -37,12 +37,12 @@ services:
- 'logs:/var/log/gitlab'
- 'data:/var/opt/gitlab'
shm_size: '256m'
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-container-networks.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' %}
{% include 'templates/docker/compose/networks.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
redis:
config:
logs:

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,7 +2,7 @@ version: '3'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
image: joomla
@ -18,10 +18,10 @@ services:
- data:/var/www/html
ports:
- "127.0.0.1:{{http_port}}:80"
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -3,3 +3,4 @@ Draft role for an LDAP implementation with sso.
## See
- [ChatGPT Conversation](https://chat.openai.com/share/77919994-5d44-4a64-877d-b572d67483d4)
- [Discouse Documentation](https://forum.veen.world/t/cymais-ldap-implementierung-documentation/49)
- [Setup Guide](https://goneuland.de/ldap-nextcloud-und-mailserver-in-docker/)

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,7 +2,7 @@ version: "3.7"
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
restart: {{docker_restart_policy}}
@ -13,9 +13,9 @@ services:
- TZ=Etc/UTC
volumes:
- ./config.toml:/listmonk/config.toml
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker-compose-volumes-just-database.yml.j2' %}
{% include 'templates/docker/compose/volumes-just-database.yml.j2' %}
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,16 +2,16 @@ version: '2.2'
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
# Core services
resolver:
image: ghcr.io/mailu/unbound:{{version_mailu}}
env_file: mailu.env
restart: {{docker_restart_policy}}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
ipv4_address: 192.168.203.254
logging:
driver: journald
@ -34,10 +34,10 @@ services:
volumes:
- "/etc/mailu/overrides/nginx:/overrides:ro"
- "/etc/mailu/certs:/certs"
{% include 'templates/docker-container-depends-on-also-database.yml.j2' %}
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
resolver:
condition: service_started
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
webmail:
radicale:
dns:
@ -50,7 +50,7 @@ services:
volumes:
- "admin_data:/data"
- "dkim:/dkim"
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
resolver:
condition: service_started
front:
@ -59,7 +59,7 @@ services:
driver: journald
dns:
- 192.168.203.254
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
imap:
image: ghcr.io/mailu/dovecot:{{version_mailu}}
@ -75,7 +75,7 @@ services:
- 192.168.203.254
logging:
driver: journald
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
smtp:
image: ghcr.io/mailu/postfix:{{version_mailu}}
@ -91,7 +91,7 @@ services:
- 192.168.203.254
logging:
driver: journald
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
oletools:
image: ghcr.io/mailu/oletools:{{version_mailu}}
@ -101,7 +101,7 @@ services:
- resolver
dns:
- 192.168.203.254
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
noinet:
antispam:
@ -121,7 +121,7 @@ services:
- 192.168.203.254
logging:
driver: journald
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
noinet:
@ -138,7 +138,7 @@ services:
- 192.168.203.254
logging:
driver: journald
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
webdav:
image: ghcr.io/mailu/radicale:{{version_mailu}}
@ -152,7 +152,7 @@ services:
- resolver
dns:
- 192.168.203.254
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
radicale:
fetchmail:
@ -170,7 +170,7 @@ services:
- resolver
dns:
- 192.168.203.254
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
webmail:
image: ghcr.io/mailu/webmail:{{version_mailu}}
@ -187,10 +187,10 @@ services:
driver: journald
dns:
- 192.168.203.254
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
webmail:
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
smtp_queue:
admin_data:
webdav_data:
@ -200,7 +200,7 @@ services:
dovecot_mail:
redis:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}
driver: bridge
ipam:
driver: default

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- name: "include docker/compose/database.yml"
include_tasks: docker/compose/database.yml
- name: "include create-domains.yml"
include_tasks: create-domains.yml

View File

@ -1,9 +1,9 @@
version: '3'
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
web:
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
@ -14,12 +14,12 @@ services:
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
ports:
- "127.0.0.1:{{http_port}}:3000"
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
volumes:
- data:/mastodon/public/system
logging:
driver: journald
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
streaming:
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
@ -30,27 +30,27 @@ services:
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
ports:
- "127.0.0.1:{{stream_port}}:4000"
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
logging:
driver: journald
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
sidekiq:
image: ghcr.io/mastodon/mastodon:{{version_mastodon}}
restart: {{docker_restart_policy}}
env_file: .env.production
command: bundle exec sidekiq
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
volumes:
- data:/mastodon/public/system
healthcheck:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
logging:
driver: journald
{% 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' %}
redis:
data:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,7 +2,7 @@ version: '3'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
logging:
@ -19,10 +19,10 @@ services:
MATOMO_DATABASE_DBNAME: "{{database_name}}"
volumes:
- data:/var/www/html
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -35,6 +35,14 @@ Matrix is an open-source project that provides a protocol for secure, decentrali
docker-compose logs
```
## Cleanup
```
# Cleanup Database
for db in matrix mautrix_whatsapp_bridge mautrix_telegram_bridge mautrix_signal_bridge mautrix_slack_bridge; do python reset-database-in-central-postgres.py $db; done
# Cleanup Docker and Volumes
docker compose down -v
```
## Debug:
- https://federationtester.matrix.org/

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- name: "include docker/compose/database.yml"
include_tasks: docker/compose/database.yml
- name: "include task certbot-matomo.yml"
include_tasks: certbot-matomo.yml
@ -53,12 +53,6 @@
path: "{{docker_compose_instance_directory}}"
state: absent
- name: "create registrations folder"
file:
path: "{{docker_compose_instance_directory}}registrations"
state: directory
mode: 0755
- name: "create bridge folders"
file:
path: "{{docker_compose_instance_directory}}mautrix/{{item.bridge_name}}"
@ -113,14 +107,15 @@
timeout: 120
loop: "{{ bridges }}"
- name: move registration files
command:
cmd: mv {{docker_compose_instance_directory}}mautrix/{{item.bridge_name}}/registration.yaml {{docker_compose_instance_directory}}registrations/{{item.bridge_name}}.registration.yaml
chdir: "{{ docker_compose_instance_directory }}"
loop: "{{ bridges }}"
- name: "change file permissions"
file:
path: "{{docker_compose_instance_directory}}registrations/{{item.bridge_name}}.registration.yaml"
path: "{{docker_compose_instance_directory}}mautrix/{{item.bridge_name}}/registration.yaml"
mode: 0755
loop: "{{ bridges }}"
loop: "{{ bridges }}"
- name: create admin account
command:
cmd: docker compose exec -it synapse register_new_matrix_user -u {{matrix_admin_name}} -p {{matrix_admin_password}} -a -c /data/homeserver.yaml http://localhost:8008
chdir: "{{ docker_compose_instance_directory }}"
ignore_errors: true
when: mode_setup | bool

View File

@ -2,7 +2,7 @@ version: '3.1'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
synapse:
image: matrixdotorg/synapse:latest
@ -14,15 +14,28 @@ services:
- synapse_data:/data
- ./homeserver.yaml:/data/homeserver.yaml:ro
- ./{{synapse_domain}}.log.config:/data/{{synapse_domain}}.log.config:ro
- ./registrations:{{registration_file_folder}}
{% for item in bridges %}
- {{docker_compose_instance_directory}}mautrix/{{item.bridge_name}}/registration.yaml:{{registration_file_folder}}{{item.bridge_name}}.registration.yaml:ro
{% endfor %}
environment:
- SYNAPSE_SERVER_NAME={{synapse_domain}}
- SYNAPSE_REPORT_STATS=no
ports:
- "127.0.0.1:{{synapse_http_port}}:8008"
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8008/"]
interval: 1m
timeout: 10s
retries: 3
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
{% for item in bridges %}
mautrix-{{item.bridge_name}}:
# The condition service_healthy does not work.
# In practice is does not make a difference anyhow, due to the reason that synapse will restart until it is running
condition: service_started
{% endfor %}
{% include 'templates/docker/container/networks.yml.j2' %}
element:
image: vectorim/element-web:latest
container_name: matrix-element
@ -31,7 +44,12 @@ services:
- ./element-config.json:/app/config.json
ports:
- "127.0.0.1:{{element_http_port}}:80"
{% include 'templates/docker-container-networks.yml.j2' %}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/"]
interval: 1m
timeout: 10s
retries: 3
{% include 'templates/docker/container/networks.yml.j2' %}
{% for item in bridges %}
mautrix-{{item.bridge_name}}:
@ -40,12 +58,15 @@ services:
restart: {{docker_restart_policy}}
volumes:
- ./mautrix/{{item.bridge_name}}:/data
- ./registrations:{{registration_file_folder}}
{% include 'templates/docker-container-networks.yml.j2' %}
healthcheck:
test: ["CMD-SHELL", "test -f {{registration_file_folder}}registration.yaml || exit 1"]
interval: 1m
timeout: 10s
retries: 3
{% include 'templates/docker/container/networks.yml.j2' %}
{% endfor %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
synapse_data:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -2,7 +2,7 @@
docker_compose_project_name: "matrix"
database_password: "{{matrix_database_password}}"
database_type: "postgres"
registration_file_folder: "/data/registration/"
registration_file_folder: "/data/"
well_known_directory: "{{nginx_well_known_root}}/matrix/"
bridges:

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -1,6 +1,6 @@
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
moodle:
image: docker.io/bitnami/moodle:latest
ports:
@ -15,13 +15,13 @@ services:
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/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
moodle:
data:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- name: "include docker/compose/database.yml"
include_tasks: docker/compose/database.yml
- name: "include tasks create-proxy-with-domain-replace.yml"
include_tasks: create-proxy-with-domain-replace.yml

View File

@ -1,7 +1,7 @@
version: '3.8'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
logging:
@ -12,8 +12,8 @@ services:
restart: {{docker_restart_policy}}
volumes:
- data:/var/www/html
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
server:
logging:
@ -27,9 +27,9 @@ services:
volumes:
- "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro"
- "data:/var/www/html:ro"
{% 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' %}
data:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -133,8 +133,8 @@ Until NC24 MariaDB version has to be used.
- https://help.nextcloud.com/t/update-to-22-failed-with-database-error-updated/120682
- https://help.nextcloud.com/t/nc-update-to-21-0-0-beta1-exception-database-error/101124/4
- https://wolfgang.gassler.org/reset-password-mariadb-mysql-docker/
- https://unix.stackexchange.com/questions/478855/ansible-docker-container-and-depends-on
- https://unix.stackexchange.com/questions/478855/ansible-docker/container/and-depends-on
- https://github.com/gdiepen/docker-convenience-scripts
- https://help.nextcloud.com/t/several-issues-after-upgrading-to-nextcloud-21/113118/3
- https://forum.openmediavault.org/index.php?thread/31782-docker-nextcloud-talk-plugin-and-turnserver/
- https://help.nextcloud.com/t/nextcloud-talk-im-docker-container-turn-server-auf-docker-host-kein-video/84133/10
- https://help.nextcloud.com/t/nextcloud-talk-im-docker/container/turn-server-auf-docker-host-kein-video/84133/10

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- name: "include docker/compose/database.yml"
include_tasks: docker/compose/database.yml
- name: "include task certbot-matomo.yml"
include_tasks: certbot-matomo.yml

View File

@ -2,9 +2,9 @@ version: '3'
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
image: "nextcloud:{{version_nextcloud}}-fpm-alpine"
@ -19,8 +19,8 @@ services:
MYSQL_USER: "{{database_username}}"
MYSQL_PASSWORD: "{{database_password}}"
MYSQL_HOST: {{database_host}}:3306
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
web:
image: nginx:alpine
@ -39,7 +39,7 @@ services:
interval: 1m
timeout: 10s
retries: 3
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
cron:
container_name: nextcloud-cron
@ -50,11 +50,11 @@ services:
volumes:
- data:/var/www/html
entrypoint: /cron.sh
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:
redis:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -21,13 +21,13 @@ x-op-app: &app
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
cache:
image: memcached
container_name: openproject-memcached
restart: {{docker_restart_policy}}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
proxy:
restart: {{docker_restart_policy}}
@ -41,7 +41,7 @@ services:
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
depends_on:
- web
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
volumes:
- "data:/var/openproject/assets"
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
@ -50,8 +50,8 @@ services:
<<: *app
command: "./docker/prod/web"
container_name: openproject-web
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-also-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
cache:
condition: service_started
seeder:
@ -79,8 +79,8 @@ services:
<<: *app
command: "./docker/prod/worker"
container_name: openproject-worker
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-also-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
cache:
condition: service_started
seeder:
@ -90,8 +90,8 @@ services:
<<: *app
command: "./docker/prod/cron"
container_name: openproject-cron
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker-container-depends-on-also-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
cache:
condition: service_started
seeder:
@ -102,9 +102,9 @@ services:
command: "./docker/prod/seeder"
container_name: openproject-seeder
restart: on-failure
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:

View File

@ -2,7 +2,7 @@ docker_compose_project_name: "openproject"
repository_directory: "{{ path_docker_compose_instances }}{{docker_compose_project_name}}/"
docker_compose_instance_directory: "{{repository_directory}}compose/"
docker_compose_file_path: "{{docker_compose_instance_directory}}docker-compose.yml"
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker-compose-backup.yml"
docker_compose_backup_path: "/tmp/{{docker_compose_project_name}}-docker/compose/backup.yml"
database_password: "{{openproject_database_password}}"
repository_address: "https://github.com/opf/openproject-deploy"
database_type: "postgres"

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- name: "include docker/compose/database.yml"
include_tasks: docker/compose/database.yml
- name: "include create-domains.yml"
include_tasks: create-domains.yml

View File

@ -2,9 +2,9 @@ version: "3.3"
services:
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
image: chocobozzz/peertube:production-bullseye
@ -18,13 +18,13 @@ services:
- data:/data
- config:/config
restart: "always"
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
assets:
data:
redis:
config:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,9 +2,9 @@ version: '2'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
{% include 'templates/docker-service-redis.yml.j2' %}
{% include 'templates/docker/services/redis.yml.j2' %}
application:
image: zknt/pixelfed
@ -19,8 +19,8 @@ services:
- "./env:/var/www/.env"
ports:
- "{{http_port}}:80"
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
worker:
image: zknt/pixelfed
restart: {{docker_restart_policy}}
@ -38,14 +38,14 @@ services:
interval: 60s
timeout: 5s
retries: 1
{% include 'templates/docker-container-depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
application:
condition: service_started
{% 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' %}
redis:
data:
bootstrap:
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-common.yml"
include_tasks: docker-compose-common.yml
- name: "include docker/compose/common.yml"
include_tasks: docker/compose/common.yml
- name: pull app repository
git:

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,7 +2,7 @@ version: '3'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
logging:
@ -26,10 +26,10 @@ services:
interval: 1m
timeout: 10s
retries: 3
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}
{% include 'templates/docker-compose-volumes.yml.j2' %}
{% include 'templates/docker/compose/volumes.yml.j2' %}
data:

View File

@ -1,6 +1,6 @@
---
- name: "include docker-compose-database.yml"
include_tasks: docker-compose-database.yml
- 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

View File

@ -2,7 +2,7 @@ version: '3'
services:
{% include 'templates/docker-service-' + database_type + '.yml.j2' %}
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
logging:
@ -25,8 +25,8 @@ services:
timeout: 10s
retries: 3
{% include 'templates/docker-container-depends-on-just-database.yml.j2' %}
{% include 'templates/docker-container-networks.yml.j2' %}
{% include 'templates/docker/container/depends-on-just-database.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %}
{% include 'templates/docker-compose-volumes-just-database.yml.j2' %}
{% include 'templates/docker-compose-networks.yml.j2' %}
{% include 'templates/docker/compose/volumes-just-database.yml.j2' %}
{% include 'templates/docker/compose/networks.yml.j2' %}

View File

@ -16,4 +16,4 @@ curl -I {{address}}
- https://askubuntu.com/questions/1103626/should-i-enable-client-max-body-size-proxy-request-buffering-and-proxy-bufferin
- https://serverfault.com/questions/692577/whats-the-difference-between-proxy-buffer-and-proxy-cache-module-in-nginx-confi
- https://github.com/sissbruecker/linkding/issues/88
- https://www.bogotobogo.com/DevOps/Docker/docker-compose-Nginx-Reverse-Proxy-Multiple-Containers.php
- https://www.bogotobogo.com/DevOps/Docker/docker/compose/Nginx-Reverse-Proxy-Multiple-Containers.php

View File

@ -1,8 +1,8 @@
- name: include docker vars/docker-database.yml.j2
include_vars: vars/docker-database.yml.j2
- name: "include docker-compose-common.yml"
include_tasks: docker-compose-common.yml
- name: "include docker/compose/common.yml"
include_tasks: docker/compose/common.yml
- name: create central database
include_role: