Compare commits

...
Sign in to create a new pull request.
Author SHA1 Message Date
11f357ba2f
add sql script for detecting room crawlers
All checks were successful
/ build (push) Successful in 53s
/ Ansible Lint (push) Successful in 2m19s
2026-11-19 15:21:48 +01:00
24cd9337ab renovate: fix jitsi version detection
All checks were successful
/ build (push) Successful in 51s
/ Ansible Lint (push) Successful in 4m3s
2026-11-19 13:07:35 +01:00
f275f7caf0 hosts/zammad: update to 17.5.9
Also teach renovate how to update
2026-11-19 12:58:40 +01:00
04288d0063 DMARC: add missing records, p=quarantine
All checks were successful
/ build (push) Successful in 52s
/ Ansible Lint (push) Successful in 2m53s
2026-11-19 09:46:24 +01:00
d1fb7c0d9a hosts/ccchoir: mitigate php vuln
All checks were successful
/ build (push) Successful in 52s
/ Ansible Lint (push) Successful in 2m52s
2026-11-18 22:08:51 +01:00
e7b41db3c1 Update docker.io/library/nginx Docker tag to v1.31.9
All checks were successful
/ build (push) Successful in 59s
/ Ansible Lint (push) Successful in 3m16s
2026-11-18 20:17:03 +00:00
980fc21a59 Merge branch 'main' of git.hamburg.ccc.de:CCCHH/ansible-infra
All checks were successful
/ build (push) Successful in 48s
/ Ansible Lint (push) Successful in 2m11s
2026-11-18 08:50:03 +01:00
509d90d27a renovate: put Pretix updates into their own group 2026-11-18 08:48:50 +01:00
b18b5b01df Update all stable non-major dependencies
Some checks failed
/ build (pull_request) Successful in 59s
/ Ansible Lint (pull_request) Successful in 2m42s
/ build (push) Has been cancelled
/ Ansible Lint (push) Has been cancelled
/ cleanup-staging (pull_request) Successful in 22s
2026-11-18 02:17:04 +00:00
1b1e774a5e
keycloak(host): hopefully enable java4shell mitigation
All checks were successful
/ build (push) Successful in 49s
/ Ansible Lint (push) Successful in 2m52s
Hopefully enable the java4shell mitigation for Keycloak by setting
JAVA_OPTS_APPEND to "-XX:-UseBASE64Intrinsics". I wasn't able to verify
the running options, but the container logs "Appending additional Java
properties to JAVA_OPTS" when JAVA_OPTS_APPEND is set, so it should
hopefully work.
https://calif.io/java4shell/
2026-11-18 02:26:06 +01:00
7da7a7e723
install earlyoom by default on all systems
All checks were successful
/ build (pull_request) Successful in 46s
/ Ansible Lint (pull_request) Successful in 3m18s
/ cleanup-staging (pull_request) Successful in 22s
/ build (push) Successful in 33s
/ Ansible Lint (push) Successful in 2m47s
It's pretty good and prevents us running into the
kernels OOM behavior (which is a bad one).

https://man.archlinux.org/man/earlyoom.1.en
2026-11-17 16:51:01 +01:00
23 changed files with 405 additions and 60 deletions

View file

@ -11,7 +11,7 @@ jobs:
build:
runs-on: docker
container:
image: docker.io/library/python:3.14-trixie
image: docker.io/library/python:3.15-trixie
steps:
- name: Pipeline info
run: |

View file

@ -24,7 +24,7 @@ jobs:
# work in our environmnet.
# Rather manually setup python (pip) before instead.
- name: Run ansible-lint
uses: https://github.com/ansible/ansible-lint@v26.6.0
uses: https://github.com/ansible/ansible-lint@v26.11.0
with:
setup_python: "false"
requirements_file: "requirements.yml"

View file

@ -1,5 +1,7 @@
docker_compose__compose_file_content: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/ccchoir/docker_compose/compose.yaml.j2') }}"
docker_compose__configuration_files: [ ]
docker_compose__configuration_files:
- name: php-custom.ini
content: "{{ lookup('ansible.builtin.file', 'resources/chaosknoten/ccchoir/docker_compose/php-custom.ini') }}"
certbot__acme_account_email_address: le-admin@hamburg.ccc.de
certbot__certificate_domains:

View file

@ -1,7 +1,7 @@
# renovate: datasource=docker depName=git.hamburg.ccc.de/ccchh/oci-images/nextcloud
nextcloud__version: 34
# renovate: datasource=docker depName=docker.io/library/postgres
nextcloud__postgres_version: 15.18
nextcloud__postgres_version: 15.20
nextcloud__fqdn: cloud.hamburg.ccc.de
nextcloud__data_dir: /data/nextcloud
nextcloud__extra_configuration: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/cloud/nextcloud/extra_configuration.config.php.j2') }}"

View file

@ -1,5 +1,5 @@
# renovate: datasource=github-releases depName=netbox packageName=netbox-community/netbox
netbox__version: "v4.6.4"
netbox__version: "v4.7.5"
netbox__config: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/netbox/netbox/configuration.py.j2') }}"
netbox__custom_pipeline_oidc_group_and_role_mapping: true

View file

@ -13,4 +13,4 @@ nginx__configurations:
content: "{{ lookup('ansible.builtin.file', 'resources/chaosknoten/pad/nginx/pad.hamburg.ccc.de.conf') }}"
# renovate: datasource=docker depName=quay.io/hedgedoc/hedgedoc
host_pad__docker_compose__hedgedoc_version: 1.11.1
host_pad__docker_compose__hedgedoc_version: 1.12.0

View file

@ -2,6 +2,26 @@ docker_compose__compose_file_content: "{{ lookup('ansible.builtin.file', 'resour
docker_compose__env_file_content: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/zammad/docker_compose/.env.j2') }}"
docker_compose__configuration_files: [ ]
# Upstream compose file resources/chaosknoten/zammad/docker_compose/compose.yaml was taken from.
# Not used by Ansible; Renovate opens a PR on new upstream tags as a reminder to replace the
# compose file (update its "Version:" header too).
# renovate: datasource=github-tags depName=zammad/zammad-docker-compose
zammad__compose_upstream_version: "v17.5.9"
# Image versions, passed to compose via .env.j2.
# Tags look like 7.2.3-0015; versioning is set in renovate.json.
# renovate: datasource=docker depName=ghcr.io/zammad/zammad
zammad__version: "7.2.3-0015"
# renovate: datasource=docker depName=docker.io/library/elasticsearch
zammad__elasticsearch_version: "9.5.5"
# renovate: datasource=docker depName=docker.io/library/memcached
zammad__memcached_version: "1.6.45-alpine"
# Major upgrades need a dump/restore, see renovate.json.
# renovate: datasource=docker depName=docker.io/library/postgres
zammad__postgres_version: "15.20-alpine"
# renovate: datasource=docker depName=docker.io/library/redis
zammad__redis_version: "8.10.3-alpine"
certbot__acme_account_email_address: le-admin@hamburg.ccc.de
certbot__certificate_domains:
- "zammad.hamburg.ccc.de"

View file

@ -48,7 +48,10 @@
},
{
"matchDatasources": ["docker"],
"matchPackageNames": ["docker.io/pretix/standalone"],
"matchPackageNames": [
"docker.io/pretix/standalone",
"git.hamburg.ccc.de/ccchh/oci-images/pretix"
],
"matchUpdateTypes": ["minor"],
"groupName": null
},
@ -57,6 +60,32 @@
"matchPackageNames": ["docker.io/pretalx/standalone"],
"matchUpdateTypes": ["minor"],
"groupName": null
},
// Zammad: Postgres major upgrades need a dump/restore, never offer them automatically
{
"matchFileNames": ["inventories/chaosknoten/host_vars/zammad.yaml"],
"matchDepNames": ["docker.io/library/postgres"],
"matchUpdateTypes": ["major"],
"enabled": false
},
// We update the compose.yaml by manually copying it from the Zammad repo. This
// is basically a reminder PR.
{
"matchDepNames": ["ghcr.io/zammad/zammad", "zammad/zammad-docker-compose"],
"automerge": false,
"groupName": null
},
// Zammad image tags carry a build number (7.2.3-0015), which docker versioning would
// treat as a fixed suffix.
{
"matchDepNames": ["ghcr.io/zammad/zammad"],
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(-(?<build>\\d+))?$"
},
// Every Jitsi stable-NNNNN release is a major update.
{
"matchDepNames": ["jitsi/docker-jitsi-meet"],
"automerge": false,
"groupName": null
}
],
"customManagers": [
@ -67,7 +96,7 @@
"/^inventories/.*?_vars/.*?\\.ya?ml$/"
],
"matchStrings": [
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s]+?)(?: packageName=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?\\s*.+?\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s"
"# renovate: datasource=(?<datasource>[a-zA-Z0-9-._]+?) depName=(?<depName>[^\\s]+?)(?: packageName=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?\\s+.+?\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s"
]
}
],

View file

@ -19,7 +19,7 @@ $TTL 600
;autoconfig IN CNAME cow.hamburg.ccc.de
IN TXT "v=spf1 mx ip4:144.76.16.19/32 ip4:212.12.51.133/32 ip6:2a01:4f8:191:331::2/128 ip6:2a00:14b0:f000:23:51:133:0:1/128 ~all"
;_dmarc IN TXT **TODO**
_dmarc IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
dkim._domainkey IN TXT ( "v=DKIM1;k=rsa;t=s;s=email;p=MIIBIjANBgkqhk"
"iG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqoWo7mbis3REqBURP3ZQZwOY7RSsS7"

View file

@ -34,7 +34,7 @@ dkim._domainkey IN TXT ("v=DKIM1;k=rsa;t=s;s=em
"j3hCMHmyjE8mn8lYnS0QfSnV8NlqKwOhF+iwqfrhMI2bZFCQ+td03RtQjaXw5W+"
"30NMcOv6Se4vPDl4nUIBJZ/wP3CBz1k66VShHB+un7SxoUQuW0+oDqN4QHH338b"
"2dDOoBJndwIDAQAB")
_dmarc IN TXT "v=DMARC1;p=none;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
_dmarc IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
localhost IN A 127.0.0.1
@ -126,6 +126,7 @@ dkim._domainkey.lists IN TXT ("v=DKIM1; h=sha256; k=r
"8KuSNAx9ycTO0urNkz4In1I2srmK8qPTfqfPU7y5kjHM1oC31+LwVNiyzeIQl"
"cdW00DMTHfzkQAjtdDXgKG5db4Dqw+2wtZfLGvBFOSfV0RspZmSDSN6ON81dk"
"lVABMMOA7Vd8wwIj0ms/gb/+AB0IQIDAQAB" )
_dmarc.lists IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
ccchoir-intern IN A 172.31.17.156
cow IN A 212.12.51.133
@ -145,6 +146,7 @@ dkim._domainkey.cowtest IN TXT ("v=DKIM1;k=rsa;t=s;s=em
"jRLI8r48pASg6IoiByV8kR3r7OZw9dzmNgbTCOEyKaicB4KJDjgJvQut8af8g"
"sYQYTCSPVqkwb5Y+yJNKhQmsYBwUX23x5Yng2gDBY/pjGeWl28SxdGhm8C23a"
"0wVCz4kQGNvcULnrzifwIDAQAB")
_dmarc.cowtest IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
_autodiscover._tcp.cowtest IN SRV 0 1 443 cow
_caldavs._tcp.cowtest IN SRV 0 1 443 cow
_caldavs._tcp.cowtest IN TXT "path=/SOGo/dav/"
@ -191,6 +193,7 @@ dkim._domainkey.id IN TXT ("v=DKIM1;k=rsa;t=s;s=em
"genmqXgBopvmnTeXa+kQnoVgrMyWE41zdWaXrDAtoYye3e31j0Nxhnfg+I7vO"
"XPfmatTH7yieDaLG+3kHjbA3WFyAkb/ZAqZaFM8k6cQJEZb7jDzdKlm1fuPrk"
"YUrfZ1V3pglzdm0QbM4wIDAQAB")
_dmarc.id IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
matrix-intern IN A 172.31.17.150
; have this for compatibility (like references in CI)
@ -213,6 +216,7 @@ dkim._domainkey.design IN TXT ("v=DKIM1;k=rsa;t=s;s=em
"TRTV4LM/n5Jm7Mm1F5DwJ+7Ie9s/WvTWKKKUExmoa5SNheGcfybC+sqnJu7L0"
"F5dWFwk0zzQDcVSY2m9qFWPEuO2fZmiB4IoG4yXkooSY2sH9Z8eX2+6i3k/ub"
"qx58Mav6VlkTxsOAdbbQIDAQAB")
_dmarc.design IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
regio-stage IN A 212.12.51.142
AAAA 2a00:14b0:f000:23:51:142:0:1
@ -303,6 +307,7 @@ dkim._domainkey.git IN TXT ("v=DKIM1;k=rsa;t=s;s=e
"qwD8/pYvMLOqvCStVHM5Zi+j1Jr0BC8mxU8pIY6rfOVt+h/V3wh0F6dL0z9nw"
"ZhDE53K8frGp2CC5dW/A37FrfMJv+ODw2tX8EdyL2hDBshBQ4r8WiYJTtIMPL"
"50A9UzZndyiLAHoeLrZQIDAQAB")
_dmarc.git IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
hackertours IN A 212.12.48.125
IN AAAA 2a00:14b0:4200:3000:125::1
MX 10 cow.hamburg.ccc.de.
@ -314,6 +319,7 @@ dkim._domainkey.hackertours IN TXT ("v=DKIM1;k=rsa;t=s;s=em
"YmhHorgnxR3HbHeUmaxIe4WM2wWRYiD+9tpY1f0O/NEEoHxmFecRhU9SVmuhLgiOyF"
"AWpPYBMOsKEHoKREENc+4VBj6H2GYTKIs+dYKDNEmVVdnRkgtAVO3FrjCkedBJ7RbR"
"RNHIqdt9u8AF+Vrs1Oq72ZQrNVR0ezEyBScJaxy5JphvBWkMSYSoDpvXLwIDAQAB")
_dmarc.hackertours IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
staging.hackertours IN A 212.12.48.125
IN AAAA 2a00:14b0:4200:3000:125::1
grafana IN A 212.12.48.125
@ -352,6 +358,7 @@ dkim._domainkey.cloud IN TXT ("v=DKIM1;k=rsa;t=s;s=em
"7+HQs9BuDo4PKQs1/mE5BEWQ0ISEKZ4bk1p8U0ZsfcdQ8o9X53Tj+JxvJHgxi"
"h7yHMr4y9hCOAkvZTFZ/Z/r3KU+N+t9NrVYm995KEernSxE3MXYIsdaFKBDvX"
"Xq837yzJmv7D9S9We3YwIDAQAB")
_dmarc.cloud IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
; Mail: hosts.hamburg.ccc.de
hosts IN MX 10 cow
IN TXT "v=spf1 mx -all"
@ -363,6 +370,7 @@ dkim._domainkey.hosts IN TXT ("v=DKIM1;k=rsa;t=s;s=em
"RMs3ECvcCVgsyhRPJahs8tzbKjhnp956ru6Jda3Yo/ubhy4AztP/7ZQayCv/W"
"06PfZNo/i2711F98L2ATQaDsOCKWhpskyrCRcR1nTWNSL7qYhOPD1hZonsd5I"
"f5WwrR4meWD3wmXbX29wIDAQAB")
_dmarc.hosts IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
; Mail: hosts-external.hamburg.ccc.de
external-hosts IN MX 10 cow
IN TXT "v=spf1 mx -all"
@ -374,6 +382,7 @@ dkim._domainkey.external-hosts IN TXT ("v=DKIM1;k=rsa;t=s;s=em
"/dL73spDajlDx4VRMUpZQq/PAoPPwCFdw/HNnzxBYBIdVloeJx91qBRaNyUIb"
"C/to8YSDVi2aMHiXhTBfoNd1VcxjlBYWqEZtdUhecUjwmbbAO4f0ECO4bs0Yz"
"d/EgJB70ry1quA0MqgZQIDAQAB")
_dmarc.external-hosts IN TXT "v=DMARC1;p=quarantine;sp=none;pct=100;rua=mailto:dmarc-report@hamburg.ccc.de;ruf=mailto:dmarc-report@hamburg.ccc.de;ri=86400;aspf=r;adkim=r;fo=1"
; for thw:
orga IN A 212.12.51.130

View file

@ -26,6 +26,7 @@ services:
- "WORDPRESS_DB_PASSWORD={{ secret__wordpress_db_password }}"
volumes:
- wordpress:/var/www/html/wp-content
- /ansible_docker_compose/configs/php-custom.ini:/usr/local/etc/php/conf.d/zz-custom.ini:ro
ports:
- "127.0.0.1:3000:80"
networks:

View file

@ -0,0 +1,2 @@
# mitigate https://www.php.net/archive/2026.php#2026-11-18-1
session.upload_progress.enabled = 0

View file

@ -2,7 +2,7 @@
services:
prometheus:
image: docker.io/prom/prometheus:v3.13.1
image: docker.io/prom/prometheus:v3.16.0
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
@ -19,7 +19,7 @@ services:
- prom_data:/prometheus
alertmanager:
image: docker.io/prom/alertmanager:v0.33.1
image: docker.io/prom/alertmanager:v0.35.0
container_name: alertmanager
command:
- '--config.file=/etc/alertmanager/alertmanager.yaml'
@ -32,7 +32,7 @@ services:
- alertmanager_data:/alertmanager
grafana:
image: docker.io/grafana/grafana:13.1.0
image: docker.io/grafana/grafana:13.3.1
container_name: grafana
ports:
- 3000:3000
@ -46,7 +46,7 @@ services:
- graf_data:/var/lib/grafana
pve-exporter:
image: docker.io/prompve/prometheus-pve-exporter:3.9.0
image: docker.io/prompve/prometheus-pve-exporter:3.12.0
container_name: pve-exporter
ports:
- 9221:9221

View file

@ -84,7 +84,7 @@ services:
# Renders the PDF handouts (HTML to PDF with Chromium); needs internet access for the map tiles.
gotenberg:
image: docker.io/gotenberg/gotenberg:8.38.1
image: docker.io/gotenberg/gotenberg:8.40.0
command: ["gotenberg", "--api-timeout=60s", "--libreoffice-disable-routes"]
networks:
frontend:

View file

@ -42,6 +42,7 @@ services:
KC_HOSTNAME_ADMIN: https://keycloak-admin.hamburg.ccc.de
KC_PROXY_HEADERS: xforwarded
KC_HTTP_ENABLED: true
JAVA_OPTS_APPEND: "-XX:-UseBASE64Intrinsics"
ports:
- "8080:8080"

View file

@ -1,7 +1,7 @@
---
services:
ntfy:
image: docker.io/binwiederhier/ntfy:v2.26.0
image: docker.io/binwiederhier/ntfy:v2.38.1
container_name: ntfy
command:
- serve

View file

@ -15,7 +15,7 @@ services:
- pretalx_net
redis:
image: docker.io/library/redis:8.8.0
image: docker.io/library/redis:8.10.3
restart: unless-stopped
volumes:
- redis:/data
@ -23,7 +23,7 @@ services:
- pretalx_net
static:
image: docker.io/library/nginx:1.31.8
image: docker.io/library/nginx:1.31.9
restart: unless-stopped
volumes:
- public:/usr/share/nginx/html

View file

@ -13,7 +13,7 @@ services:
restart: unless-stopped
redis:
image: docker.io/library/redis:8.8.0
image: docker.io/library/redis:8.10.3
ports:
- "6379:6379"
volumes:
@ -25,7 +25,7 @@ services:
backend:
pretix:
image: git.hamburg.ccc.de/ccchh/oci-images/pretix:2026.8
image: git.hamburg.ccc.de/ccchh/oci-images/pretix:2026.9
command: ["all"]
ports:
- "8345:80"

View file

@ -1,4 +1,8 @@
POSTGRES_PASS={{ secret__zammad_db_password }}
POSTGRES_VERSION=15-alpine
REDIS_VERSION=7-alpine
NGINX_SERVER_SCHEME=https
VERSION={{ zammad__version }}
ELASTICSEARCH_VERSION={{ zammad__elasticsearch_version }}
MEMCACHE_VERSION={{ zammad__memcached_version }}
POSTGRES_VERSION={{ zammad__postgres_version }}
REDIS_VERSION={{ zammad__redis_version }}

View file

@ -1,10 +1,9 @@
---
version: "3.8"
# Taken from: https://github.com/zammad/zammad-docker-compose/blob/master/docker-compose.yml
# Version: v14.1.1
# Version: v17.5.9
# Update from new tag by replacing all content.
# Configuration should be done in the .env.j2.
# Image versions are set in inventories/chaosknoten/host_vars/zammad.yaml (tracked by Renovate).
x-shared:
zammad-service: &zammad-service
@ -16,12 +15,27 @@ x-shared:
POSTGRESQL_PASS: ${POSTGRES_PASS:-zammad}
POSTGRESQL_PORT: ${POSTGRES_PORT:-5432}
POSTGRESQL_OPTIONS: ${POSTGRESQL_OPTIONS:-?pool=50}
POSTGRESQL_DB_CREATE:
# The bundled zammad-postgresql service creates the database up front, and its
# application role is deliberately not allowed to create databases. Set this to
# 'true' if you point Zammad at an external server and want it to create the
# database itself - the configured role then needs the CREATEDB attribute.
POSTGRESQL_DB_CREATE: ${POSTGRESQL_DB_CREATE:-false}
# Redis standalone
REDIS_URL: ${REDIS_URL:-redis://zammad-redis:6379}
# Redis sentinel
REDIS_SENTINELS:
REDIS_SENTINEL_NAME:
REDIS_USERNAME:
REDIS_PASSWORD:
REDIS_SENTINEL_USERNAME:
REDIS_SENTINEL_PASSWORD:
S3_URL:
# Backup settings
BACKUP_DIR: "${BACKUP_DIR:-/var/tmp/zammad}"
BACKUP_TIME: "${BACKUP_TIME:-03:00}"
BACKUP_ON_START: "${BACKUP_ON_START:-false}"
HOLD_DAYS: "${HOLD_DAYS:-10}"
TZ: "${TZ:-Europe/Berlin}"
# Allow passing in these variables via .env:
@ -43,9 +57,48 @@ x-shared:
ZAMMAD_HTTP_TYPE:
ZAMMAD_FQDN:
ZAMMAD_WEB_CONCURRENCY:
ZAMMAD_MANAGE_SESSIONS_JOBS_WORKERS:
ZAMMAD_PROCESS_SESSIONS_JOBS_WORKERS:
ZAMMAD_PROCESS_SCHEDULED_JOBS_WORKERS:
ZAMMAD_PROCESS_DELAYED_JOBS_WORKERS:
ZAMMAD_PROCESS_DELAYED_JOBS_WORKER_THREADS:
ZAMMAD_PROCESS_DELAYED_AI_JOBS_WORKERS:
ZAMMAD_PROCESS_DELAYED_AI_JOBS_WORKER_THREADS:
ZAMMAD_PROCESS_DELAYED_COMMUNICATION_INBOUND_JOBS_WORKERS:
ZAMMAD_PROCESS_DELAYED_COMMUNICATION_INBOUND_JOBS_WORKER_THREADS:
ZAMMAD_OTRS_IMPORT_READ_TIMEOUT:
ZAMMAD_OTRS_IMPORT_TOTAL_TIMEOUT:
ZAMMAD_HTTP_OPEN_TIMEOUT:
ZAMMAD_HTTP_READ_TIMEOUT:
ZAMMAD_HTTP_TOTAL_TIMEOUT:
ZAMMAD_HTTP_AI_READ_TIMEOUT:
ZAMMAD_HTTP_AI_TOTAL_TIMEOUT:
ZAMMAD_HTTP_ELASTICSEARCH_READ_TIMEOUT:
ZAMMAD_HTTP_ELASTICSEARCH_TOTAL_TIMEOUT:
ZAMMAD_HTTP_ELASTICSEARCH_REINDEX_READ_TIMEOUT:
ZAMMAD_HTTP_ELASTICSEARCH_REINDEX_TOTAL_TIMEOUT:
ZAMMAD_HTTP_IMPORT_ATTACHMENT_READ_TIMEOUT:
ZAMMAD_HTTP_IMPORT_ATTACHMENT_TOTAL_TIMEOUT:
ZAMMAD_HTTP_WEBHOOK_READ_TIMEOUT:
ZAMMAD_HTTP_WEBHOOK_TOTAL_TIMEOUT:
# Allow disabling individual background services in the scheduler container.
ZAMMAD_PROCESS_SESSIONS_JOBS_DISABLE:
ZAMMAD_MANAGE_SESSIONS_JOBS_DISABLE:
ZAMMAD_PROCESS_SCHEDULED_JOBS_DISABLE:
ZAMMAD_PROCESS_DELAYED_JOBS_DISABLE:
ZAMMAD_PROCESS_DELAYED_AI_JOBS_DISABLE:
ZAMMAD_PROCESS_DELAYED_COMMUNICATION_INBOUND_JOBS_DISABLE:
ZAMMAD_GRAPHQL_INTROSPECTION:
ZAMMAD_AI_API_URL:
ZAMMAD_AI_TOKEN:
ZAMMAD_UI_BULK_BACKGROUND_UPDATE_THRESHOLD:
ZAMMAD_SETTING_TTL:
ZAMMAD_SAFE_MODE:
ZAMMAD_WEBSOCKET_SESSION_STORE_FORCE_FS_BACKEND:
ZAMMAD_RAILSSERVER_PORT:
# ZAMMAD_SESSION_JOBS_CONCURRENT is deprecated, please use ZAMMAD_PROCESS_SESSIONS_JOBS_WORKERS instead.
ZAMMAD_SESSION_JOBS_CONCURRENT:
# Variables used by ngingx-proxy container for reverse proxy creations
@ -57,84 +110,225 @@ x-shared:
LETSENCRYPT_HOST:
LETSENCRYPT_EMAIL:
image: ${IMAGE_REPO:-ghcr.io/zammad/zammad}:${VERSION:-7.1.2}
image: ${IMAGE_REPO:-ghcr.io/zammad/zammad}:${VERSION:-7.2.3-0015}
init: true
restart: ${RESTART:-always}
volumes:
- zammad-backup:/var/tmp/zammad:ro # needed for waiting on restore operations
- zammad-storage:/opt/zammad/storage
depends_on:
- zammad-memcached
- zammad-postgresql
- zammad-redis
zammad-memcached:
condition: service_healthy
zammad-postgresql:
condition: service_healthy
zammad-redis:
condition: service_healthy
services:
zammad-backup:
<<: *zammad-service
command: [ "zammad-backup" ]
command: ["zammad-backup"]
volumes:
- zammad-backup:/var/tmp/zammad
- zammad-storage:/opt/zammad/storage:ro
- zammad-storage:/opt/zammad/storage
user: 0:0
zammad-elasticsearch:
image: elasticsearch:${ELASTICSEARCH_VERSION:-8.19.19}
image: elasticsearch:${ELASTICSEARCH_VERSION:-9.5.5}
restart: ${RESTART:-always}
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
environment:
discovery.type: single-node
xpack.security.enabled: 'false'
xpack.security.enabled: "false"
ES_JAVA_OPTS: ${ELASTICSEARCH_JAVA_OPTS:--Xms1g -Xmx1g}
zammad-init:
<<: *zammad-service
command: [ "zammad-init" ]
depends_on:
- zammad-postgresql
command: ["zammad-init"]
restart: on-failure
user: 0:0
zammad-memcached:
command: memcached -m 256M
image: memcached:${MEMCACHE_VERSION:-1.6.41-alpine}
image: memcached:${MEMCACHE_VERSION:-1.6.45-alpine}
restart: ${RESTART:-always}
healthcheck:
test: ["CMD", "nc", "-z", "127.0.0.1", "11211"]
interval: 10s
timeout: 5s
start_period: 10s
retries: 5
zammad-nginx:
<<: *zammad-service
command: [ "zammad-nginx" ]
command: ["zammad-nginx"]
init: false
expose:
- "${NGINX_PORT:-8080}"
ports:
- "${NGINX_EXPOSE_PORT:-8080}:${NGINX_PORT:-8080}"
depends_on:
- zammad-railsserver
zammad-railsserver:
condition: service_healthy
zammad-postgresql:
# PostgreSQL tuning: dedicated variables for the settings the Zammad documentation
# recommends to tune, plus POSTGRES_EXTRA_OPTS for any other setting as raw
# -c flags - see .env.dist. Only variables that are set are passed to the server,
# unset ones leave it completely untouched (including manual tuning in the data
# volume). Compose word-splits the string into argv like a shell, so the
# free-form POSTGRES_EXTRA_OPTS works without a shell wrapper.
command: >-
postgres
${POSTGRES_MAX_CONNECTIONS:+-c max_connections=${POSTGRES_MAX_CONNECTIONS}}
${POSTGRES_SHARED_BUFFERS:+-c shared_buffers=${POSTGRES_SHARED_BUFFERS}}
${POSTGRES_TEMP_BUFFERS:+-c temp_buffers=${POSTGRES_TEMP_BUFFERS}}
${POSTGRES_WORK_MEM:+-c work_mem=${POSTGRES_WORK_MEM}}
${POSTGRES_MAX_STACK_DEPTH:+-c max_stack_depth=${POSTGRES_MAX_STACK_DEPTH}}
${POSTGRES_EXTRA_OPTS:-}
# Docker caps /dev/shm at 64MB - the one PostgreSQL-adjacent knob a -c flag cannot
# reach. Raise it together with shared_buffers/work_mem, otherwise parallel query
# workers can fail with "could not resize shared memory segment".
shm_size: ${POSTGRES_SHM_SIZE:-64mb}
environment:
POSTGRES_DB: ${POSTGRES_DB:-zammad_production}
POSTGRES_USER: ${POSTGRES_USER:-zammad}
POSTGRES_PASSWORD: ${POSTGRES_PASS:-zammad}
image: postgres:${POSTGRES_VERSION:-17.9-alpine}
# The bootstrap role of the postgres image is always a superuser, so it is kept
# separate from the role Zammad connects with and only used for administration.
# Its password falls back to POSTGRES_PASS, so that hardening that one variable
# does not silently leave a superuser behind on the default password.
POSTGRES_USER: ${POSTGRES_SUPERUSER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_SUPERUSER_PASS:-${POSTGRES_PASS:-zammad}}
# Consumed by the initdb hook below, to provision Zammad's unprivileged role
# and the database it owns.
ZAMMAD_DB: ${POSTGRES_DB:-zammad_production}
ZAMMAD_DB_USER: ${POSTGRES_USER:-zammad}
ZAMMAD_DB_PASS: ${POSTGRES_PASS:-zammad}
image: postgres:${POSTGRES_VERSION:-17.12-alpine}
restart: ${RESTART:-always}
volumes:
- postgresql-data:/var/lib/postgresql/data
configs:
- source: postgresql-initdb
target: /docker-entrypoint-initdb.d/10-create-zammad-role.sh
mode: 0555
healthcheck:
# Connect over TCP as Zammad's own role rather than using pg_isready, which
# reports success for an unknown role or database, and would also accept the
# socket-only server that runs while the data directory is still initialising.
# Dependent services wait for this healthcheck, so it has to establish that
# the role and the database the initdb hook provisions exist and accept
# connections.
#
# The password is supplied so that this keeps working where host connections
# require authentication, for example with
# POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256. With the image default the
# loopback address is trusted, so the credentials are not verified there.
test:
- CMD-SHELL
- |-
PGPASSWORD="$${ZAMMAD_DB_PASS}" \
psql --no-password --quiet --output /dev/null --variable ON_ERROR_STOP=1 \
--host 127.0.0.1 --username "$${ZAMMAD_DB_USER}" \
--dbname "$${ZAMMAD_DB}" --command "SELECT 1"
interval: 10s
timeout: 5s
start_period: 60s
retries: 5
zammad-railsserver:
<<: *zammad-service
command: [ "zammad-railsserver" ]
command: ["zammad-railsserver"]
healthcheck:
test: ["CMD", "curl", "-sf", "http://127.0.0.1:${ZAMMAD_RAILSSERVER_PORT:-3000}"]
interval: 30s
timeout: 5s
start_period: 120s
retries: 3
zammad-redis:
image: redis:${REDIS_VERSION:-7.4.8-alpine}
image: redis:${REDIS_VERSION:-8.10.3-alpine}
restart: ${RESTART:-always}
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
start_period: 10s
retries: 5
zammad-scheduler:
<<: *zammad-service
command: [ "zammad-scheduler" ]
command: ["zammad-scheduler"]
zammad-websocket:
<<: *zammad-service
command: [ "zammad-websocket" ]
command: ["zammad-websocket"]
configs:
postgresql-initdb:
# Provisions the database that Zammad uses, owned by a dedicated login role.
#
# The postgres image unconditionally makes its bootstrap role a superuser. Zammad
# does not need any superuser capability - it only owns its own database and
# relies on the built-in plpgsql extension - so the application role is created
# here as a plain login role, rather than reusing the bootstrap role.
#
# This runs only while an empty data directory is initialised. Installations whose
# volume already exists keep the role layout they were created with, see the
# README for how to migrate those.
#
# The content is inlined so that this file stays self-contained and can be
# deployed as-is, for example by pasting it into Portainer. '$$' escapes Compose
# interpolation, so those variables are expanded inside the container instead.
content: |
#!/bin/bash
set -o errexit
set -o pipefail
# initdb has already run by the time this hook does, so a rejected configuration
# cannot be repaired by correcting it and starting again: the data directory is
# populated and the entrypoint never processes this directory a second time.
# Say so, rather than leaving the operator with a role or database that is
# merely reported missing later on.
zammad_abort() {
echo "$1" >&2
echo "Correct this, then remove the postgresql-data volume and start again. The" >&2
echo " database directory is already initialised, so this will not run twice." >&2
exit 1
}
# Zammad must not reuse the bootstrap role, which is always a superuser. This
# cannot be enforced on later starts: the only reliable signal is this
# comparison, and checking the role's actual attributes instead would mark
# every installation predating this change as unhealthy.
if [ "$${ZAMMAD_DB_USER}" = "$${POSTGRES_USER}" ]; then
zammad_abort "POSTGRES_USER and POSTGRES_SUPERUSER must differ, the latter is a superuser."
fi
# The system databases exist already, so they would keep the bootstrap role as
# their owner, and Zammad would run inside a database it does not own.
case "$${ZAMMAD_DB}" in
postgres | template0 | template1)
zammad_abort "POSTGRES_DB must not be one of PostgreSQL's system databases."
;;
esac
echo "Creating the '$${ZAMMAD_DB_USER}' role and the '$${ZAMMAD_DB}' database…"
# The identifiers and the password are passed as psql variables, so that psql
# quotes them and no shell quoting can leak into the statements. The role owns
# the database, which already carries every privilege it needs on it.
psql --variable ON_ERROR_STOP=1 \
--username "$${POSTGRES_USER}" \
--dbname "$${POSTGRES_DB}" \
--variable role="$${ZAMMAD_DB_USER}" \
--variable pass="$${ZAMMAD_DB_PASS}" \
--variable db="$${ZAMMAD_DB}" <<'EOSQL'
CREATE ROLE :"role" LOGIN PASSWORD :'pass';
CREATE DATABASE :"db" OWNER :"role";
EOSQL
volumes:
elasticsearch-data:

Some files were not shown because too many files have changed in this diff Show more