Files
computer-playbook/roles/web-app-xwiki/templates/docker-compose.yml.j2
Kevin Veen-Birkenbach a4a8061998 Refactor: unify Docker build config via build.yml.j2 include
Replaced duplicated inline build definitions in multiple docker-compose.yml.j2
templates with a shared include (roles/docker-container/templates/build.yml.j2).
This ensures consistent use of pull_policy: never and Dockerfile context across
services (Postgres, Bookwyrm, Bridgy Fed, Chess, Confluence, Jira, Moodle,
OpenProject, Pretix, Roulette Wheel, WordPress, XWiki, Simpleicons).

Conversation: https://chatgpt.com/share/68cd8f35-b764-800f-9b00-2c837103d2fb
2025-09-19 19:13:44 +02:00

42 lines
2.1 KiB
Django/Jinja

{% include 'roles/docker-compose/templates/base.yml.j2' %}
application:
{% include 'roles/docker-container/templates/build.yml.j2' %}
image: "{{ XWIKI_IMAGE_CUSTOM }}"
container_name: "{{ XWIKI_CONTAINER }}"
hostname: '{{ XWIKI_HOSTNAME}}'
ports:
- "127.0.0.1:{{ XWIKI_HOST_PORT }}:{{ container_port }}"
environment:
JAVA_OPTS: >-
{% if xwiki_oidc_enabled_switch| bool %}
-Dxwiki.authentication.authclass=org.xwiki.contrib.oidc.auth.OIDCAuthServiceImpl
{% elif xwiki_ldap_enabled_switch | bool %}
-Dxwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
-Dxwiki.authentication.ldap=1
-Dxwiki.authentication.ldap.trylocal={{ (XWIKI_LDAP_TRYLOCAL | bool) | ternary(1, 0) }}
-Dxwiki.authentication.ldap.group_mapping=XWiki.XWikiAdminGroup={{ XWIKI_LDAP_ADMIN_GROUP_DN }}
-Dxwiki.authentication.ldap.mode_group_sync=always
-Dxwiki.authentication.ldap.server={{ XWIKI_LDAP_SERVER }}
-Dxwiki.authentication.ldap.port={{ XWIKI_LDAP_PORT }}
-Dxwiki.authentication.ldap.base_DN={{ XWIKI_LDAP_BASE_DN }}
-Dxwiki.authentication.ldap.bind_DN={{ XWIKI_LDAP_BIND_DN }}
-Dxwiki.authentication.ldap.bind_pass={{ XWIKI_LDAP_BIND_PASS }}
-Dxwiki.authentication.ldap.fields_mapping={{ XWIKI_LDAP_FIELDS_MAPPING }}
-Dxwiki.authentication.ldap.update_user=1
{% else %}
-Dxwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl
{% endif %}
volumes:
- "{{ XWIKI_HOST_PROPERTIES_PATH }}:/usr/local/tomcat/webapps/ROOT/WEB-INF/xwiki.properties"
- 'data:{{ XWIKI_DOCK_DATA_DIR }}'
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
data:
name: {{ XWIKI_DATA_VOLUME }}
{% include 'roles/docker-compose/templates/networks.yml.j2' %}