Adjusted variables and docker-compose file to account for multitenancy setups.
This commit is contained in:
parent
7b8fc988ab
commit
703a738e39
3 changed files with 12 additions and 5 deletions
|
@ -30,7 +30,9 @@ Role Variables
|
|||
| --------------------------- | ------------------------------------------------------------------------------- | ------------------ |
|
||||
| collabora_install_user | The user who is going to manage/run the Docker Compose services | {{ ansible_user }} |
|
||||
| collabora_install_path | The location where the service should be deployed | /home/{{ collabora_install_user }} |
|
||||
| collabora_multitenant_label | A label (unique accross all instances on this host) identifying the tenant | |
|
||||
| collabora_virtual_host | The host under which CODE is available from the outside (e.g. collabora.example.org) | localhost |
|
||||
| collabora_exposed_port | The port under which the Collabora instance is available | 9980 |
|
||||
| collabora_domain_regex_pattern | A regular expression to match hosts that should be allowed to access CODE | localhost |
|
||||
| collabora_admin_user | Used to access to the Admin UI: https://<code-server>/loleaflet/dist/admin/admin.html | |
|
||||
| collabora_admin_password | | |
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
# defaults file for Collabora Online
|
||||
collabora_install_user: '{{ ansible_user }}' # This user must be present on the host
|
||||
collabora_install_path: '/home/{{ collabora_install_user }}'
|
||||
collabora_multitenant_label:
|
||||
collabora_exposed_port: 9980
|
||||
collabora_virtual_host: localhost
|
||||
collabora_public_url: http://{{ collabora_virtual_host }}
|
||||
collabora_domain_regex_pattern: localhost
|
||||
# Internal variables
|
||||
collabora_multitenant_postfix: "{{ '_' + collabora_multitenant_label if (collabora_multitenant_label) else '' }}"
|
||||
|
|
|
@ -3,6 +3,8 @@ version: '3'
|
|||
services:
|
||||
collabora:
|
||||
image: collabora/code
|
||||
container_name: collabora{{ collabora_multitenant_postfix }}
|
||||
hostname: collabora{{ collabora_multitenant_postfix }}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- extra_params
|
||||
|
@ -15,11 +17,11 @@ services:
|
|||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik_public"
|
||||
- "traefik.http.routers.collabora.rule=Host(`{{ collabora_virtual_host }}`)"
|
||||
- "traefik.port=9980"
|
||||
- "traefik.http.routers.collabora.entrypoints=websecure"
|
||||
- "traefik.http.routers.collabora.tls=true"
|
||||
- "traefik.http.routers.collabora.tls.certresolver=defaultresolver"
|
||||
- "traefik.http.routers.collabora{{ collabora_multitenant_postfix }}.rule=Host(`{{ collabora_virtual_host }}`)"
|
||||
- "traefik.port={{ collabora_exposed_port }}"
|
||||
- "traefik.http.routers.collabora{{ collabora_multitenant_postfix }}.entrypoints=websecure"
|
||||
- "traefik.http.routers.collabora{{ collabora_multitenant_postfix }}.tls=true"
|
||||
- "traefik.http.routers.collabora{{ collabora_multitenant_postfix }}.tls.certresolver=defaultresolver"
|
||||
networks:
|
||||
public:
|
||||
cap_add:
|
||||
|
|
Loading…
Add table
Reference in a new issue