chore: add central collabora service
instead of providing one for owncloud and nextcloud separately Signed-off-by: Bert-Jan Fikse <bert-jan@whatwedo.ch>
This commit is contained in:
parent
064b939d06
commit
d3d7bb9ba5
6 changed files with 84 additions and 30 deletions
36
roles/collabora/templates/docker-compose.yml.j2
Normal file
36
roles/collabora/templates/docker-compose.yml.j2
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
services:
|
||||
collabora:
|
||||
image: {{ collabora_image }}
|
||||
container_name: {{ collabora_service_name }}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
domain: {{ collabora_allowed_domains | map('replace', '.', '\\.') | map('regex_replace', '^(.*)$', '^\\1$$') | join('|') }}
|
||||
extra_params: >-
|
||||
--o:ssl.enable=false
|
||||
--o:ssl.termination=true
|
||||
--o:net.frame_ancestors={{ collabora_allowed_domains | map('regex_replace', '^(.*)$', 'https://\\1') | join(' ') }}
|
||||
cap_add:
|
||||
- MKNOD
|
||||
networks:
|
||||
- {{ collabora_traefik_network }}
|
||||
{% if collabora_extra_hosts is defined and collabora_extra_hosts | length > 0 %}
|
||||
extra_hosts:
|
||||
{% for host in collabora_extra_hosts %}
|
||||
- "{{ host }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network={{ collabora_traefik_network }}
|
||||
- traefik.http.routers.{{ collabora_service_name }}.rule=Host(`{{ collabora_domain }}`)
|
||||
- traefik.http.services.{{ collabora_service_name }}.loadbalancer.server.port={{ collabora_port }}
|
||||
{% if collabora_use_ssl %}
|
||||
- traefik.http.routers.{{ collabora_service_name }}.entrypoints=websecure
|
||||
- traefik.http.routers.{{ collabora_service_name }}.tls=true
|
||||
{% else %}
|
||||
- traefik.http.routers.{{ collabora_service_name }}.entrypoints=web
|
||||
{% endif %}
|
||||
|
||||
networks:
|
||||
{{ collabora_traefik_network }}:
|
||||
external: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue