Optimized role structure in preparation for new backup script

This commit is contained in:
2025-07-16 12:31:01 +02:00
parent e56c960900
commit f9426cfb74
29 changed files with 217 additions and 82 deletions

View File

@@ -0,0 +1,11 @@
# Memcached
## Description
This Ansible role provides a Jinja2 snippet to inject a Memcached service definition into your Docker Compose setup.
## Further Resources
- [Official Memcached Docker image on Docker Hub](https://hub.docker.com/_/memcached)
- [Memcached official documentation](https://memcached.org/)
- [Docker Compose reference](https://docs.docker.com/compose/compose-file/)

View File

@@ -0,0 +1,7 @@
docker:
services:
memcached:
image: memcached
version: latest
backup:
enabled: false

View File

@@ -0,0 +1,17 @@
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Provides a Docker Compose snippet for a Memcached service (`memcached`) with optional volume, healthcheck, and logging."
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
galaxy_tags:
- memcached
- docker
- cache
repository: "https://github.com/kevinveenbirkenbach/cymais"
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
documentation: "https://github.com/kevinveenbirkenbach/cymais/tree/main/roles/svc-db-memcached"
dependencies: []

View File

@@ -0,0 +1 @@
application_id: svc-db-memcached

View File

@@ -1,4 +1,4 @@
# Role: svc-db-redis
# Redis
## Description

View File

@@ -0,0 +1,7 @@
docker:
services:
redis:
image: redis
version: alpine
backup:
enabled: false

View File

@@ -1,8 +1,10 @@
# This template needs to be included in docker-compose.yml, which depend on redis
{% set redis_image = applications | get_app_conf('svc-db-redis', 'docker.services.redis.image') %}
{% set redis_version = applications | get_app_conf('svc-db-redis', 'docker.services.redis.version')%}
redis:
image: redis:alpine
container_name: {{application_id}}-redis
restart: {{docker_restart_policy}}
image: "{{ redis_image }}:{{ redis_version }}"
container_name: {{ application_id }}-redis
restart: {{ docker_restart_policy }}
logging:
driver: journald
volumes:

View File

@@ -1 +1 @@
application_id: redis
application_id: svc-db-redis

View File

@@ -15,10 +15,11 @@ docker:
database:
enabled: true
akaunting:
no_stop_required: true
image: docker.io/akaunting/akaunting
backup:
no_stop_required: true
image: docker.io/akaunting/akaunting
version: latest
name: akaunting
name: akaunting
volumes:
data: akaunting_data
credentials: {}

View File

@@ -10,9 +10,10 @@ docker:
database:
enabled: true
baserow:
no_stop_required: true
image: "baserow/baserow"
version: "latest"
name: "baserow"
backup:
no_stop_required: true
image: "baserow/baserow"
version: "latest"
name: "baserow"
volumes:
data: "baserow_data"
data: "baserow_data"

View File

@@ -29,7 +29,9 @@ docker:
# @todo check this out and repair it if necessary
discourse:
name: "discourse"
no_stop_required: true
image: "local_discourse/discourse_application" # Necessary to define this for the docker 2 loc backup
backup:
no_stop_required: true
volumes:
data: discourse_data
network: discourse

View File

@@ -42,7 +42,8 @@ docker:
gitea:
image: "gitea/gitea"
version: "latest"
no_stop_required: true
backup:
no_stop_required: true
port: 3000
name: "gitea"
volumes:

View File

@@ -15,6 +15,7 @@ docker:
listmonk:
image: listmonk/listmonk
version: latest
no_stop_required: true
backup:
no_stop_required: true
name: listmonk
port: 9000

View File

@@ -22,7 +22,8 @@ docker:
mastodon:
image: "ghcr.io/mastodon/mastodon"
version: latest
no_stop_required: true
backup:
no_stop_required: true
name: "mastodon"
streaming:
image: "ghcr.io/mastodon/mastodon-streaming"

View File

@@ -36,7 +36,8 @@ docker:
image: "matomo"
version: "latest"
name: "matomo"
no_stop_required: true
backup:
no_stop_required: true
database:
enabled: true
redis:

View File

@@ -6,7 +6,8 @@ docker:
version: latest
image: matrixdotorg/synapse
name: matrix-synapse
no_stop_required: true
backup:
no_stop_required: true
element:
version: latest
image: vectorim/element-web

View File

@@ -6,7 +6,8 @@ docker:
mediawiki:
image: mediawiki
version: latest
no_stop_required: true
backup:
no_stop_required: true
name: mediawiki
volumes:
data: mediawiki_data

View File

@@ -22,7 +22,8 @@ docker:
name: "nextcloud"
image: "nextcloud"
version: "latest-fpm-alpine"
no_stop_required: true
backup:
no_stop_required: true
proxy:
name: "nextcloud-proxy"
image: "nginx"

View File

@@ -13,7 +13,7 @@ ldap:
features:
matomo: true
css: false # Temporary deactivated. Needs to be optimized for production use.
port-ui-desktop: true
port-ui-desktop: true
ldap: true
central_database: true
oauth2: true
@@ -34,8 +34,9 @@ docker:
web:
name: openproject-web
image: openproject/community
version: "13" # Update when available. Sadly no rolling release implemented
no_stop_required: true
version: "13" # Update when available. No rolling release implemented
backup:
no_stop_required: true
seeder:
name: openproject-seeder
cron:
@@ -44,6 +45,10 @@ docker:
name: openproject-worker
proxy:
name: openproject-proxy
cache:
name: openproject-cache
image: "" # If need a specific memcached image you have to define it here, otherwise the version from svc-db-memcached will be used
version: "" # If need a specific memcached version you have to define it here, otherwise the version from svc-db-memcached will be used
volumes:
data: "openproject_data"

View File

@@ -10,8 +10,8 @@ x-op-app: &app
{% include 'roles/docker-compose/templates/base.yml.j2' %}
cache:
image: memcached
container_name: openproject-memcached
image: "{{ openproject_cache_image}}:{{openproject_cache_version }}"
container_name: {{ openproject_cache_name }}
{% include 'roles/docker-container/templates/base.yml.j2' %}
proxy:

View File

@@ -10,6 +10,22 @@ openproject_seeder_name: "{{ applications | get_app_conf(application_id, 'd
openproject_cron_name: "{{ applications | get_app_conf(application_id, 'docker.services.cron.name', True) }}"
openproject_proxy_name: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.name', True) }}"
openproject_worker_name: "{{ applications | get_app_conf(application_id, 'docker.services.worker.name', True) }}"
openproject_cache_name: "{{ applications | get_app_conf(application_id, 'docker.services.cache.name', True) }}"
openproject_cache_image: >-
{{ applications
| get_app_conf(application_id, 'docker.services.cache.image')
or applications
| get_app_conf('svc-db-memcached', 'docker.services.memcached.image')
}}
openproject_cache_version: >-
{{ applications
| get_app_conf(application_id, 'docker.services.cache.version')
or applications
| get_app_conf('svc-db-memcached', 'docker.services.memcached.version')
}}
openproject_plugins_folder: "{{docker_compose.directories.volumes}}plugins/"

View File

@@ -34,6 +34,7 @@ docker:
name: "peertube"
version: "production-bookworm"
image: "chocobozzz/peertube"
no_stop_required: true
backup:
no_stop_required: true
volumes:
data: peertube_data

View File

@@ -30,7 +30,8 @@ docker:
image: "zknt/pixelfed"
version: "latest"
name: "pixelfed"
no_stop_required: true
backup:
no_stop_required: true
worker:
name: "pixelfed_worker"
volumes:

View File

@@ -46,7 +46,8 @@ docker:
version: latest
image: wordpress
name: wordpress
no_stop_required: true
backup:
no_stop_required: true
volumes:
data: wordpress_data
rbac: