mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized collabora draft
This commit is contained in:
@@ -9,11 +9,14 @@ server:
|
||||
whitelist:
|
||||
font-src:
|
||||
- "data:"
|
||||
#frame-src:
|
||||
# - ""
|
||||
domains:
|
||||
canonical:
|
||||
- "cloud.{{ PRIMARY_DOMAIN }}"
|
||||
# nextcloud: "cloud.{{ PRIMARY_DOMAIN }}"
|
||||
# talk: "talk.{{ PRIMARY_DOMAIN }}" @todo needs to be activated
|
||||
helpers:
|
||||
collabora: "{{ WEB_PROTOCOL ~ '://' ~ applications | get_app_conf('web-svc-collabora','server.domains.canonical[0]',False,'<< defaults_applications[web-svc-collabora].server.domains.canonical[0]>>') }}"
|
||||
docker:
|
||||
volumes:
|
||||
data: nextcloud_data
|
||||
@@ -41,13 +44,8 @@ docker:
|
||||
image: "nextcloud/aio-talk"
|
||||
version: "latest"
|
||||
enabled: false # Not enabled yet, because just implemented during refactoring and not tested yet. if tested activate
|
||||
# Its in a own role. @todo remove it if it gets implemented via the other role
|
||||
#collabora:
|
||||
# name: "nextcloud-collabora"
|
||||
# image: "nextcloud-collabora"
|
||||
# version: "latest"
|
||||
oidc:
|
||||
enabled: " {{ applications | get_app_conf('web-app-nextcloud', 'features.oidc', False, True) }}" # Activate OIDC for Nextcloud
|
||||
enabled: "{{ applications | get_app_conf('web-app-nextcloud', 'features.oidc', False, True) }}" # Activate OIDC for Nextcloud
|
||||
# floavor decides which OICD plugin should be used.
|
||||
# Available options: oidc_login, sociallogin
|
||||
# @see https://apps.nextcloud.com/apps/oidc_login
|
||||
@@ -149,7 +147,7 @@ plugins:
|
||||
enabled: false
|
||||
fileslibreofficeedit:
|
||||
# Nextcloud LibreOffice integration: allows online editing of documents with LibreOffice (https://apps.nextcloud.com/apps/fileslibreofficeedit)
|
||||
enabled: true
|
||||
enabled: "{{ not (applications | get_app_conf('web-app-nextcloud', 'plugins.richdocuments.enabled', False, True)) }}"
|
||||
forms:
|
||||
# Nextcloud forms: facilitates creation of forms and surveys (https://apps.nextcloud.com/apps/forms)
|
||||
enabled: true
|
||||
@@ -225,7 +223,7 @@ plugins:
|
||||
enabled: false # Deactivated because it let to bugs
|
||||
richdocuments:
|
||||
# Nextcloud Rich Documents: provides collaborative document editing capabilities (https://apps.nextcloud.com/apps/richdocuments)
|
||||
enabled: false # @todo To set it default to true activate https://hub.docker.com/r/collabora/code before
|
||||
enabled: true # @todo To set it default to true activate https://hub.docker.com/r/collabora/code before
|
||||
sociallogin:
|
||||
# Nextcloud social login: allows authentication using social networks (https://apps.nextcloud.com/apps/sociallogin)
|
||||
enabled: "{{ _applications_nextcloud_oidc_flavor=='sociallogin' | lower }}"
|
||||
|
@@ -29,6 +29,5 @@ galaxy_info:
|
||||
logo:
|
||||
class: "fa-solid fa-cloud"
|
||||
run_after:
|
||||
- web-app-collabora
|
||||
- web-app-keycloak
|
||||
- web-app-mastodon
|
||||
|
@@ -9,10 +9,10 @@
|
||||
- name: Flush handlers so Nextcloud container is restarted and ready
|
||||
meta: flush_handlers
|
||||
|
||||
- name: "Wait until Nextcloud is reachable on port {{ports.localhost.http[application_id]}}"
|
||||
- name: "Wait until Nextcloud is reachable on port {{ ports.localhost.http[application_id] }}"
|
||||
wait_for:
|
||||
host: 127.0.0.1
|
||||
port: "{{ports.localhost.http[application_id]}}"
|
||||
port: "{{ ports.localhost.http[application_id] }}"
|
||||
timeout: 120
|
||||
delay: 2
|
||||
state: started
|
||||
|
@@ -1,4 +1,11 @@
|
||||
---
|
||||
#- name: "Install Collabora Dependency"
|
||||
# include_role:
|
||||
# name: web-svc-collabora
|
||||
# vars:
|
||||
# flush_handlers: true
|
||||
# when: NEXTCLOUD_COLLABORA_ENABLED
|
||||
|
||||
- name: "include role for {{ application_id }} to receive certs & do modification routines"
|
||||
include_role:
|
||||
name: srv-web-7-6-composer
|
||||
|
@@ -4,10 +4,10 @@
|
||||
image: "{{ nextcloud_image }}:{{ nextcloud_version }}"
|
||||
container_name: {{ nextcloud_container }}
|
||||
volumes:
|
||||
- data:{{nextcloud_docker_work_directory}}
|
||||
- data:{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}
|
||||
- {{nextcloud_host_config_additives_directory}}:{{nextcloud_docker_config_additives_directory}}:ro
|
||||
healthcheck:
|
||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{nextcloud_docker_work_directory}}occ status"]
|
||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}occ status"]
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -39,7 +39,7 @@
|
||||
driver: journald
|
||||
restart: {{ DOCKER_RESTART_POLICY }}
|
||||
ports:
|
||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:{{ container_port }}"
|
||||
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
|
||||
volumes:
|
||||
- "{{ docker_compose.directories.volumes }}nginx.conf:/etc/nginx/nginx.conf:ro"
|
||||
volumes_from:
|
||||
@@ -57,10 +57,10 @@
|
||||
logging:
|
||||
driver: journald
|
||||
volumes:
|
||||
- data:{{nextcloud_docker_work_directory}}
|
||||
- data:{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}
|
||||
entrypoint: /cron.sh
|
||||
healthcheck:
|
||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{nextcloud_docker_work_directory}}occ status"]
|
||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}occ status"]
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
@@ -11,7 +11,7 @@ http_port: "{{ ports.localhost.http[applica
|
||||
database_password: "{{ applications | get_app_conf(application_id, 'credentials.database_password', True)}}"
|
||||
database_type: "mariadb" # Database flavor
|
||||
|
||||
nextcloud_plugins_enabled: "{{ applications | get_app_conf(application_id, 'plugins_enabled', True) }}"
|
||||
nextcloud_plugins_enabled: "{{ applications | get_app_conf(application_id, 'plugins_enabled') }}"
|
||||
nextcloud_administrator_username: "{{ applications | get_app_conf(application_id, 'users.administrator.username') }}"
|
||||
|
||||
# Control Node
|
||||
@@ -27,38 +27,45 @@ nextcloud_host_nginx_path: "{{ NGINX.DIRECTORIES.HTTP.SERVE
|
||||
|
||||
# Docker
|
||||
|
||||
nextcloud_volume: "{{ applications | get_app_conf(application_id, 'docker.volumes.data', True) }}"
|
||||
nextcloud_volume: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
|
||||
|
||||
nextcloud_version: "{{ applications | get_app_conf(application_id, 'docker.services.nextcloud.version', True) }}"
|
||||
nextcloud_image: "{{ applications | get_app_conf(application_id, 'docker.services.nextcloud.image', True) }}"
|
||||
nextcloud_container: "{{ applications | get_app_conf(application_id, 'docker.services.nextcloud.name', True) }}"
|
||||
nextcloud_version: "{{ applications | get_app_conf(application_id, 'docker.services.nextcloud.version') }}"
|
||||
nextcloud_image: "{{ applications | get_app_conf(application_id, 'docker.services.nextcloud.image') }}"
|
||||
nextcloud_container: "{{ applications | get_app_conf(application_id, 'docker.services.nextcloud.name') }}"
|
||||
|
||||
nextcloud_proxy_name: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.name', True) }}"
|
||||
nextcloud_proxy_image: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.image', True) }}"
|
||||
nextcloud_proxy_version: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.version', True) }}"
|
||||
nextcloud_proxy_name: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.name') }}"
|
||||
nextcloud_proxy_image: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.image') }}"
|
||||
nextcloud_proxy_version: "{{ applications | get_app_conf(application_id, 'docker.services.proxy.version') }}"
|
||||
|
||||
nextcloud_cron_name: "{{ applications | get_app_conf(application_id, 'docker.services.cron.name', True) }}"
|
||||
nextcloud_cron_name: "{{ applications | get_app_conf(application_id, 'docker.services.cron.name') }}"
|
||||
|
||||
nextcloud_talk_name: "{{ applications | get_app_conf(application_id, 'docker.services.talk.name', True) }}"
|
||||
nextcloud_talk_image: "{{ applications | get_app_conf(application_id, 'docker.services.talk.image', True) }}"
|
||||
nextcloud_talk_version: "{{ applications | get_app_conf(application_id, 'docker.services.talk.version', True) }}"
|
||||
# Plugins
|
||||
|
||||
## Talk
|
||||
nextcloud_talk_name: "{{ applications | get_app_conf(application_id, 'docker.services.talk.name') }}"
|
||||
nextcloud_talk_image: "{{ applications | get_app_conf(application_id, 'docker.services.talk.image') }}"
|
||||
nextcloud_talk_version: "{{ applications | get_app_conf(application_id, 'docker.services.talk.version') }}"
|
||||
nextcloud_talk_enabled: "{{ applications | is_docker_service_enabled(application_id, 'talk') }}"
|
||||
nextcloud_talk_stun_port: "{{ ports.public.stun[application_id] }}"
|
||||
# nextcloud_talk_domain: "{{ domains[application_id].talk }}"
|
||||
|
||||
#nextcloud_collabora_name: "{{ applications | get_app_conf(application_id, 'docker.services.collabora.name', True) }}"
|
||||
# Collabora
|
||||
#nextcloud_collabora_name: "{{ applications | get_app_conf(application_id, 'docker.services.collabora.name') }}"
|
||||
NEXTCLOUD_COLLABORA_URL: "{{ domains | get_url('web-svc-collabora', WEB_PROTOCOL) }}"
|
||||
#NEXTCLOUD_COLLABORA_DOMAIN: "{{ domains | get_domain('web-svc-collabora') }}"
|
||||
NEXTCLOUD_COLLABORA_ENABLED: "{{ applications | get_app_conf(application_id, 'plugins.richdocuments.enabled') }}"
|
||||
|
||||
## User Configuration
|
||||
nextcloud_docker_user_id: 82 # UID of the www-data user
|
||||
nextcloud_docker_user: "www-data" # Name of the www-data user (Set here to easy change it in the future)
|
||||
|
||||
## Internal Paths
|
||||
nextcloud_docker_work_directory: "/var/www/html/" # Name of the workdir in which the application is stored
|
||||
nextcloud_docker_config_directory: "{{nextcloud_docker_work_directory}}config/" # Folder in which the Nextcloud configurations are stored
|
||||
nextcloud_docker_config_file: "{{nextcloud_docker_config_directory}}config.php" # Path to the Nextcloud configuration file
|
||||
nextcloud_docker_config_additives_directory: "{{nextcloud_docker_config_directory}}infinito/" # Path to the folder which contains additional configurations
|
||||
NEXTCLOUD_DOCKER_WORK_DIRECTORY: "/var/www/html/" # Name of the workdir in which the application is stored
|
||||
NEXTCLOUD_DOCKER_CONFIG_DIRECTORY: "{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}config/" # Folder in which the Nextcloud configurations are stored
|
||||
nextcloud_docker_config_file: "{{ NEXTCLOUD_DOCKER_CONFIG_DIRECTORY }}config.php" # Path to the Nextcloud configuration file
|
||||
nextcloud_docker_config_additives_directory: "{{ NEXTCLOUD_DOCKER_CONFIG_DIRECTORY }}infinito/" # Path to the folder which contains additional configurations
|
||||
nextcloud_docker_include_instructions_file: "/tmp/includes.php" # Path to the temporary file which will be included to the config.php to load the additional configurations
|
||||
|
||||
## Execution
|
||||
nextcloud_docker_exec: "docker exec -u {{ nextcloud_docker_user }} {{ nextcloud_container }}" # General execute composition
|
||||
nextcloud_docker_exec_occ: "{{nextcloud_docker_exec}} {{ nextcloud_docker_work_directory }}occ" # Execute docker occ command
|
||||
nextcloud_docker_exec_occ: "{{nextcloud_docker_exec}} {{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}occ" # Execute docker occ command
|
15
roles/web-app-nextcloud/vars/plugins/richdocuments.yml
Normal file
15
roles/web-app-nextcloud/vars/plugins/richdocuments.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
plugin_configuration:
|
||||
- appid: "richdocuments"
|
||||
configkey: "wopi_url"
|
||||
configvalue: "{{ NEXTCLOUD_COLLABORA_URL }}"
|
||||
|
||||
# Optional, but helpful if you ever front Collabora by a CDN:
|
||||
- appid: "richdocuments"
|
||||
configkey: "public_wopi_url"
|
||||
configvalue: "{{ NEXTCLOUD_COLLABORA_URL }}"
|
||||
|
||||
# Only use this if you terminate TLS in front and run CODE plain HTTP behind it.
|
||||
# 0 = verify certs (recommended), 1 = skip verification
|
||||
- appid: "richdocuments"
|
||||
configkey: "disable_certificate_verification"
|
||||
configvalue: 0
|
Reference in New Issue
Block a user