mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 18:29:21 +00:00 
			
		
		
		
	feat(nextcloud): integrate Talk & Whiteboard; refactor to NEXTCLOUD_* vars; full-stack setup
config(ports): add Nextcloud websocket port (4003); canonical domains (nextcloud/talk/whiteboard) refactor: unify get_app_conf usage & Jinja spacing; migrate paths/handlers to new NEXTCLOUD_* vars feat(plugins): split plugin routines; configure Whiteboard via occ (URL + JWT) fix(oidc): use NEXTCLOUD_URL for logout; correct LDAP attribute mappings; add OIDC flavor switch feat: Whiteboard container & reverse-proxy location; Talk STUN/WS ports; Redis URL for Whiteboard chore: drop obsolete TODO; minor cleanups in oauth2-proxy, matrix, peertube, pgadmin, phpldapadmin, pixelfed, phpmyadmin security(schema): Bluesky jwt_secret now base64_prefixed_32; add Nextcloud whiteboard_jwt_secret db: normalize postgres image tag templating; central DB host checks spacing fixes ops: add full-stack bootstrap (certs, proxy, volumes); internal nginx config reload handler update refs: https://chatgpt.com/share/68b5f5b7-8d64-800f-b001-1241f818dc0e
This commit is contained in:
		| @@ -1,72 +1,88 @@ | ||||
| --- | ||||
| # General | ||||
| application_id:                                 "web-app-nextcloud"                                           # Application identifier | ||||
| container_port:                                 80 | ||||
|  | ||||
| # Networking | ||||
| domain:                                         "{{ domains | get_domain(application_id) }}"                  # Public domain at which Nextcloud will be accessable | ||||
| http_port:                                      "{{ ports.localhost.http[application_id] }}"                  # Port at which nextcloud is reachable in the local network | ||||
| application_id:                     "web-app-nextcloud"                                           # Application identifier | ||||
| container_port:                     80 | ||||
|  | ||||
| # Database | ||||
| database_password:                              "{{ applications | get_app_conf(application_id, 'credentials.database_password', True)}}" | ||||
| database_type:                                  "mariadb"                                                                                   # Database flavor | ||||
| database_password:                  "{{ applications | get_app_conf(application_id, 'credentials.database_password') }}" | ||||
| database_type:                      "mariadb"                                                                                   # Database flavor | ||||
|  | ||||
| nextcloud_plugins_enabled:                      "{{ applications | get_app_conf(application_id, 'plugins_enabled') }}" | ||||
| nextcloud_administrator_username:               "{{ applications | get_app_conf(application_id, 'users.administrator.username') }}" | ||||
| # Nextcloud  | ||||
| ## General  | ||||
| NEXTCLOUD_DOMAIN:                   "{{ domains | get_domain(application_id) }}" | ||||
| NEXTCLOUD_PORT:                     "{{ ports.localhost.http[application_id] }}" | ||||
| NEXTCLOUD_URL:                      "{{ domains | get_url(application_id, WEB_PROTOCOL) }}" | ||||
|  | ||||
| # Control Node | ||||
| nextcloud_control_node_plugin_vars_directory:   "{{role_path}}/vars/plugins/"                                 # Folder in which the files for the plugin configuration are stored | ||||
| nextcloud_control_node_plugin_tasks_directory:  "{{role_path}}/tasks/plugins/"                                # Folder which contains the files for extra plugin configuration tasks | ||||
| NEXTCLOUD_PLUGINS_ENABLED:          "{{ applications | get_app_conf(application_id, 'plugins_enabled') }}" | ||||
| NEXTCLOUD_ADMINISTRATOR_USERNAME:   "{{ applications | get_app_conf(application_id, 'users.administrator.username') }}" | ||||
|  | ||||
| # Host  | ||||
| ## Plugins | ||||
| NEXTCLOUD_PLUGIN_ITEMS:             "{{ applications | get_app_conf(application_id, 'plugins') | dict2items }}" | ||||
|  | ||||
| ## Host Paths | ||||
| nextcloud_host_config_additives_directory:      "{{ docker_compose.directories.volumes }}infinito/"             # This folder is the path to which the additive configurations will be copied | ||||
| nextcloud_host_include_instructions_file:       "{{ docker_compose.directories.volumes }}includes.php"          # Path to the instruction file on the host. Responsible for loading the additional configurations | ||||
| nextcloud_host_nginx_path:                      "{{ NGINX.DIRECTORIES.HTTP.SERVERS }}{{ domains | get_domain(application_id) }}.conf" # Nginx path for proxy conf | ||||
| ## Paths | ||||
|  | ||||
| # Docker | ||||
| ### Host | ||||
| NEXTCLOUD_HOST_CONF_ADD_PATH:       "{{ [ docker_compose.directories.volumes, 'infinito' ] | path_join }}"              # This folder is the path to which the additive configurations will be copied | ||||
| NEXTCLOUD_HOST_INCL_PATH:           "{{ [ docker_compose.directories.volumes, 'includes.php' ] | path_join }}"          # Path to the instruction file on the host. Responsible for loading the additional configurations | ||||
| NEXTCLOUD_HOST_NGINX_PATH:          "{{ [ NGINX.DIRECTORIES.HTTP.SERVERS, NEXTCLOUD_DOMAIN ~ '.conf' ] | path_join }}"  # Nginx path for proxy conf | ||||
|  | ||||
| nextcloud_volume:                               "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}" | ||||
|  | ||||
| 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') }}" | ||||
| 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') }}" | ||||
|  | ||||
| # 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 }}" | ||||
|  | ||||
| # 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) | ||||
| ## Control Node | ||||
| NEXTCLOUD_CNODE_PLUGIN_VARS_PATH:   "{{ [role_path, 'vars/plugins/'] | path_join }}"                                 # Folder in which the files for the plugin configuration are stored | ||||
| NEXTCLOUD_CNODE_PLUGIN_TASKS_PATH:  "{{ [role_path, 'tasks/plugins/'] | path_join }}"                                # Folder which contains the files for extra plugin configuration tasks  | ||||
|  | ||||
| ## 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_include_instructions_file:     "/tmp/includes.php"                                           # Path to the temporary file which will be included to the config.php to load the additional configurations | ||||
| NEXTCLOUD_DOCKER_WORK_DIRECTORY:    "/var/www/html/"                                              # Name of the workdir in which the application is stored | ||||
| NEXTCLOUD_DOCKER_CONF_DIRECTORY:    "{{ NEXTCLOUD_DOCKER_WORK_DIRECTORY }}config/"                # Folder in which the Nextcloud configurations are stored      | ||||
| NEXTCLOUD_DOCKER_CONFIG_FILE:       "{{ NEXTCLOUD_DOCKER_CONF_DIRECTORY }}config.php"             # Path to the Nextcloud configuration file | ||||
| NEXTCLOUD_DOCKER_CONF_ADD_PATH:     "{{ NEXTCLOUD_DOCKER_CONF_DIRECTORY }}infinito/"              # Path to the folder which contains additional configurations | ||||
| NEXTCLOUD_DOCKER_INCL_PATH:         "/tmp/includes.php"                                           # Path to the temporary file which will be included to the config.php to load the additional configurations | ||||
|  | ||||
| ## Administrator | ||||
| NEXTCLOUD_ADMINISTRATOR_USER:       "{{ applications | get_app_conf(application_id, 'users.administrator.username') }}" | ||||
| NEXTCLOUD_ADMINISTRATOR_PASSWORD:   "{{ applications | get_app_conf(application_id, 'credentials.administrator_password') }}" | ||||
|  | ||||
| ## Docker | ||||
|  | ||||
| ### Base | ||||
| NEXTCLOUD_VOLUME:                   "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}" | ||||
| 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') }}" | ||||
|  | ||||
| ### Proxy | ||||
| NEXTCLOUD_PROXY_CONTAINER:          "{{ 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') }}" | ||||
|  | ||||
| ### Cron | ||||
| NEXTCLOUD_CRON_CONTAINER:           "{{ applications | get_app_conf(application_id, 'docker.services.cron.name') }}" | ||||
|  | ||||
| ### Talk  | ||||
| NEXTCLOUD_TALK_CONTAINER:           "{{ 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 | get_app_conf(application_id, 'plugins.spreed.enabled') }}" | ||||
| NEXTCLOUD_TALK_STUN_PORT:           "{{ ports.public.stun[application_id] }}" | ||||
| NEXTCLOUD_TALK_WS_PORT:             "{{ ports.localhost.websocket[application_id] }}" | ||||
| NEXTCLOUD_TALK_DOMAIN:              "{{ domains[application_id].talk }}" | ||||
|  | ||||
| NEXTCLOUD_WHITEBOARD_CONTAINER:     "{{ applications | get_app_conf(application_id, 'docker.services.whiteboard.name') }}" | ||||
| NEXTCLOUD_WHITEBOARD_IMAGE:         "{{ applications | get_app_conf(application_id, 'docker.services.whiteboard.image') }}" | ||||
| NEXTCLOUD_WHITEBOARD_VERSION:       "{{ applications | get_app_conf(application_id, 'docker.services.whiteboard.version') }}" | ||||
| NEXTCLOUD_WHITEBOARD_ENABLED:       "{{ applications | get_app_conf(application_id, 'plugins.whiteboard.enabled') }}" | ||||
| NEXTCLOUD_WHITEBOARD_INTERNAL_PORT: "3002" | ||||
| NEXTCLOUD_WHITEBOARD_JWT:           "{{ applications | get_app_conf(application_id, 'credentials.whiteboard_jwt_secret') }}" | ||||
| NEXTCLOUD_WHITEBOARD_LOCATION:      "/whiteboard/" | ||||
| NEXTCLOUD_WHITEBOARD_URL:           "{{ [ NEXTCLOUD_URL, NEXTCLOUD_WHITEBOARD_LOCATION ] | url_join }}" | ||||
|  | ||||
| ### Collabora | ||||
| NEXTCLOUD_COLLABORA_URL:            "{{ domains | get_url('web-svc-collabora', WEB_PROTOCOL) }}" | ||||
| # 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) | ||||
|  | ||||
| ## 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_COLLOBORA_CONF_EXEC:                  "docker exec {{ applications | get_app_conf('web-svc-collabora', 'docker.services.collabora.name') }} coolconfig" | ||||
| 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 | ||||
| @@ -181,4 +181,4 @@ plugin_configuration: | ||||
|   - | ||||
|     appid: "user_ldap" | ||||
|     configkey: "s01ldap_expert_username_attr" | ||||
|     configvalue: "{{LDAP.USER.ATTRIBUTES.ID}}" | ||||
|     configvalue: "{{ LDAP.USER.ATTRIBUTES.ID }}" | ||||
| @@ -15,7 +15,7 @@ nextcloud_system_config: | ||||
|     value: "{{ HOST_LL | upper }}" | ||||
|  | ||||
|   - parameter: "trusted_domains 0" | ||||
|     value: "{{ domains | get_domain(application_id) }}" | ||||
|     value: "{{ NEXTCLOUD_DOMAIN }}" | ||||
|  | ||||
|   - parameter: "overwrite.cli.url" | ||||
|     value: "{{ domains | get_url(application_id, WEB_PROTOCOL) }}" | ||||
|     value: "{{ NEXTCLOUD_URL }}" | ||||
		Reference in New Issue
	
	Block a user