refactor: remove Collabora from office stack
This commit is contained in:
parent
e14ff74c5b
commit
ce13442b20
|
|
@ -55,7 +55,6 @@ locals {
|
|||
office_server_name = local.office_server_name
|
||||
office_backend_host = var.office_backend_host
|
||||
office_backend_port = tostring(var.office_backend_port)
|
||||
office_collabora_backend_port = tostring(var.office_collabora_backend_port)
|
||||
office_onlyoffice_server_name = local.office_onlyoffice_server_name
|
||||
office_onlyoffice_backend_port = tostring(var.office_onlyoffice_backend_port)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -249,25 +249,6 @@ server {
|
|||
|
||||
client_max_body_size 2g;
|
||||
|
||||
# Collabora shares the office hostname; route its WOPI and WebSocket paths
|
||||
# to the local Collabora backend while the root path remains Nextcloud.
|
||||
location ~ ^/(browser|hosting|cool|lool)(/|$) {
|
||||
proxy_pass http://${office_backend_host}:${office_collabora_backend_port};
|
||||
proxy_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Port 443;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://${office_backend_host}:${office_backend_port};
|
||||
proxy_http_version 1.1;
|
||||
|
|
|
|||
|
|
@ -163,11 +163,6 @@ variable "office_backend_port" {
|
|||
default = 8090
|
||||
}
|
||||
|
||||
variable "office_collabora_backend_port" {
|
||||
type = number
|
||||
default = 9980
|
||||
}
|
||||
|
||||
variable "office_onlyoffice_server_name" {
|
||||
type = string
|
||||
default = "docs.lab2025.duckdns.org"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
# Online office stack
|
||||
|
||||
This stack provides browser-based office editing through Nextcloud. It deploys
|
||||
ONLYOFFICE Docs for Excel-compatible XLSX editing and keeps Collabora available
|
||||
as a separately managed fallback. It stores documents in the dedicated
|
||||
ONLYOFFICE Docs for Excel-compatible XLSX editing. It stores documents in the dedicated
|
||||
`/data/homelab-office` tree on Debian and uses PostgreSQL and Redis instead of
|
||||
SQLite or in-container state.
|
||||
|
||||
|
|
|
|||
|
|
@ -46,23 +46,6 @@ services:
|
|||
- ${OFFICE_NEXTCLOUD_DATA_DIR:-/data/homelab-office/nextcloud}:/var/www/html
|
||||
networks: [office]
|
||||
|
||||
collabora:
|
||||
image: ${OFFICE_COLLABORA_IMAGE:-collabora/code:latest}
|
||||
container_name: ${OFFICE_COLLABORA_CONTAINER_NAME:-homelab-office-collabora}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
aliasgroup1: https://${OFFICE_PUBLIC_HOST:-office.lab2025.duckdns.org}:443
|
||||
dictionaries: ${OFFICE_COLLABORA_DICTIONARIES:-en_US es_MX}
|
||||
extra_params: >-
|
||||
--o:ssl.enable=false
|
||||
--o:ssl.termination=true
|
||||
--o:server_name=${OFFICE_PUBLIC_HOST:-office.lab2025.duckdns.org}
|
||||
--o:welcome.enable=false
|
||||
--o:logging.level=warning
|
||||
ports:
|
||||
- "${OFFICE_BIND_IP:-127.0.0.1}:${OFFICE_COLLABORA_PORT:-9980}:9980"
|
||||
networks: [office]
|
||||
|
||||
onlyoffice:
|
||||
image: ${OFFICE_ONLYOFFICE_IMAGE:-onlyoffice/documentserver:latest}
|
||||
container_name: ${OFFICE_ONLYOFFICE_CONTAINER_NAME:-homelab-office-onlyoffice}
|
||||
|
|
|
|||
2
jeannie
2
jeannie
|
|
@ -56,7 +56,7 @@ Build And Bootstrap
|
|||
deploy-api Deploy the Temporal-backed Jeannie API on Debian.
|
||||
deploy-heimdall Deploy the Debian-hosted Heimdall dashboard.
|
||||
deploy-dex Deploy the Debian-hosted Dex SSO stack.
|
||||
deploy-office Deploy Nextcloud + ONLYOFFICE/Collabora online office.
|
||||
deploy-office Deploy Nextcloud + ONLYOFFICE online office.
|
||||
deploy-matrix Deploy the Matrix homeserver (Synapse + Element + Postgres).
|
||||
deploy-ai-stack Deploy the Debian-hosted AI gateway stack.
|
||||
deploy-ai-tools Install/wire local AI CLIs to the AI gateway.
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ mapping = {
|
|||
"services.dex.public_url": "LAB_DEX_PUBLIC_URL",
|
||||
"services.office.install_dir": "LAB_OFFICE_INSTALL_DIR",
|
||||
"services.office.http_port": "LAB_OFFICE_HTTP_PORT",
|
||||
"services.office.collabora_port": "LAB_OFFICE_COLLABORA_PORT",
|
||||
"services.office.onlyoffice_port": "LAB_OFFICE_ONLYOFFICE_PORT",
|
||||
"services.office.onlyoffice_url": "LAB_OFFICE_ONLYOFFICE_URL",
|
||||
"services.office.public_url": "LAB_OFFICE_PUBLIC_URL",
|
||||
|
|
@ -292,7 +291,6 @@ export_homelab_inventory_tf_vars() {
|
|||
export_if_unset TF_VAR_office_server_name "${LAB_OFFICE_PUBLIC_HOST:-office.${LAB_DOMAIN:-lab2025.duckdns.org}}"
|
||||
export_if_unset TF_VAR_office_backend_host "${LAB_OFFICE_BACKEND_HOST:-${LAB_DEBIAN_TAILSCALE_IP:-${LAB_DEBIAN_LAN_IP:-}}}"
|
||||
export_if_unset TF_VAR_office_backend_port "${LAB_OFFICE_HTTP_PORT:-8090}"
|
||||
export_if_unset TF_VAR_office_collabora_backend_port "${LAB_OFFICE_COLLABORA_PORT:-9980}"
|
||||
export_if_unset TF_VAR_office_onlyoffice_server_name "${LAB_OFFICE_ONLYOFFICE_HOST:-docs.${LAB_DOMAIN:-lab2025.duckdns.org}}"
|
||||
export_if_unset TF_VAR_office_onlyoffice_backend_port "${LAB_OFFICE_ONLYOFFICE_PORT:-9981}"
|
||||
export_if_unset TF_VAR_jeannie_api_backend_host "${LAB_JEANNIE_API_BACKEND_HOST:-${LAB_DEBIAN_TAILSCALE_IP:-${LAB_DEBIAN_LAN_IP:-}}}"
|
||||
|
|
|
|||
|
|
@ -974,7 +974,6 @@ deploy_office() {
|
|||
local onlyoffice_host="${LAB_OFFICE_ONLYOFFICE_HOST:-docs.${LAB_DOMAIN:-lab2025.duckdns.org}}"
|
||||
local bind_ip="${LAB_OFFICE_BIND_IP:-0.0.0.0}"
|
||||
local http_port="${LAB_OFFICE_HTTP_PORT:-8090}"
|
||||
local collabora_port="${LAB_OFFICE_COLLABORA_PORT:-9980}"
|
||||
local onlyoffice_port="${LAB_OFFICE_ONLYOFFICE_PORT:-9981}"
|
||||
local env_file="${install_dir}/.env"
|
||||
local nextcloud_data_dir="${install_dir}/nextcloud"
|
||||
|
|
@ -1030,7 +1029,6 @@ OFFICE_PUBLIC_HOST=${public_host}
|
|||
OFFICE_ONLYOFFICE_HOST=${onlyoffice_host}
|
||||
OFFICE_BIND_IP=${bind_ip}
|
||||
OFFICE_HTTP_PORT=${http_port}
|
||||
OFFICE_COLLABORA_PORT=${collabora_port}
|
||||
OFFICE_ONLYOFFICE_PORT=${onlyoffice_port}
|
||||
OFFICE_ONLYOFFICE_JWT_SECRET=$(random_value)
|
||||
OFFICE_POSTGRES_PASSWORD=${random_value}
|
||||
|
|
@ -1082,9 +1080,7 @@ ENV_EOF
|
|||
fi
|
||||
|
||||
sudo docker exec "${OFFICE_NEXTCLOUD_CONTAINER_NAME:-homelab-office-nextcloud}" \
|
||||
sh -lc 'su -s /bin/sh www-data -c "php occ app:install richdocuments 2>/dev/null || true; php occ app:enable richdocuments 2>/dev/null || true; php occ config:app:set richdocuments wopi_url --value=http://collabora:9980 2>/dev/null || true; php occ app:install user_oidc 2>/dev/null || true; php occ app:enable user_oidc 2>/dev/null || true"' || true
|
||||
sudo docker exec "${OFFICE_NEXTCLOUD_CONTAINER_NAME:-homelab-office-nextcloud}" \
|
||||
sh -lc 'su -s /bin/sh www-data -c "php occ richdocuments:activate-config"'
|
||||
sh -lc 'su -s /bin/sh www-data -c "php occ app:install user_oidc 2>/dev/null || true; php occ app:enable user_oidc 2>/dev/null || true"' || true
|
||||
sudo docker exec -i \
|
||||
-e "ONLYOFFICE_JWT_SECRET=${onlyoffice_jwt_secret}" \
|
||||
-e "ONLYOFFICE_PUBLIC_URL=https://${onlyoffice_host}/" \
|
||||
|
|
@ -1114,7 +1110,7 @@ OFFICE_OIDC_EOF
|
|||
exit 1
|
||||
fi
|
||||
echo "Office stack is running at https://${public_host}/ with Dex SSO."
|
||||
echo "Nextcloud data: ${nextcloud_data_dir}; Collabora backend: http://127.0.0.1:${collabora_port}."
|
||||
echo "Nextcloud data: ${nextcloud_data_dir}; ONLYOFFICE endpoint: https://${onlyoffice_host}."
|
||||
}
|
||||
|
||||
configure_grafana_dex_secret() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue