From 51124784c26efd7bd3518ec49dc9d733b85fbbf4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Apr 2026 09:30:29 +0000 Subject: [PATCH] Serve windmill on /windmill subpath instead of port 3100; add to disable-containers.js Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/3c346202-c2e6-4e97-bf61-a1f5d42670fd Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- Containers/apache/Caddyfile | 6 ++++++ Containers/apache/start.sh | 12 ++++-------- Containers/nextcloud/entrypoint.sh | 2 +- php/containers.json | 7 +------ php/public/disable-containers.js | 6 ++++++ php/templates/includes/optional-containers.twig | 2 +- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/Containers/apache/Caddyfile b/Containers/apache/Caddyfile index 51a11604..29f61d89 100644 --- a/Containers/apache/Caddyfile +++ b/Containers/apache/Caddyfile @@ -63,6 +63,12 @@ http://{$APACHE_HOST}.nextcloud-aio:23973, # For Collabora callback and WOPI req reverse_proxy {$WHITEBOARD_HOST}:3002 } + # Windmill + route /windmill/* { + uri strip_prefix /windmill + reverse_proxy {$WINDMILL_HOST}:8000 + } + # HaRP (ExApps) route /exapps/* { reverse_proxy {$HARP_HOST}:8780 diff --git a/Containers/apache/start.sh b/Containers/apache/start.sh index 403eeda1..44925db2 100644 --- a/Containers/apache/start.sh +++ b/Containers/apache/start.sh @@ -60,14 +60,10 @@ if [ -z "$ADDITIONAL_TRUSTED_DOMAIN" ]; then fi echo "$CADDYFILE" > /tmp/Caddyfile -# Add windmill site if windmill is enabled -if [ "$WINDMILL_ENABLED" = "yes" ]; then - cat >> /tmp/Caddyfile << 'WINDMILL_EOF' - -https://{$NC_DOMAIN}:3100 { - reverse_proxy {$WINDMILL_HOST}:8000 -} -WINDMILL_EOF +# Remove windmill route if windmill is not enabled +if [ "$WINDMILL_ENABLED" != "yes" ]; then + CADDYFILE="$(sed '/# Windmill/{N;N;N;N;d}' /tmp/Caddyfile)" + echo "$CADDYFILE" > /tmp/Caddyfile fi # Fix the Caddyfile format diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index ced43f22..f2c45fde 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -1099,7 +1099,7 @@ if [ "$WINDMILL_ENABLED" = 'yes' ]; then elif [ "$SKIP_UPDATE" != 1 ]; then php /var/www/html/occ app:update windmill fi - php /var/www/html/occ config:app:set windmill windmill_url --value="https://$NC_DOMAIN:3100" + php /var/www/html/occ config:app:set windmill windmill_url --value="https://$NC_DOMAIN/windmill" php /var/www/html/occ config:app:set windmill windmill_instance_url --value="http://$WINDMILL_HOST:8000" else if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/windmill" ]; then diff --git a/php/containers.json b/php/containers.json index 15286b65..ed7379c1 100644 --- a/php/containers.json +++ b/php/containers.json @@ -36,11 +36,6 @@ "ip_binding": "%APACHE_IP_BINDING%", "port_number": "%APACHE_PORT%", "protocol": "udp" - }, - { - "ip_binding": "%APACHE_IP_BINDING%", - "port_number": "3100", - "protocol": "tcp" } ], "internal_port": "%APACHE_PORT%", @@ -981,7 +976,7 @@ "retries": 3 }, "environment": [ - "BASE_URL=https://%NC_DOMAIN%:3100", + "BASE_URL=https://%NC_DOMAIN%/windmill", "TZ=%TIMEZONE%", "NUM_WORKERS=1", "MODE=standalone", diff --git a/php/public/disable-containers.js b/php/public/disable-containers.js index 41c5cfe1..bbebbcfe 100644 --- a/php/public/disable-containers.js +++ b/php/public/disable-containers.js @@ -41,4 +41,10 @@ document.addEventListener("DOMContentLoaded", function(event) { // Whiteboard let whiteboard = document.getElementById("whiteboard"); whiteboard.disabled = true; + + // Windmill + let windmill = document.getElementById("windmill"); + if (windmill) { + windmill.disabled = true; + } }); diff --git a/php/templates/includes/optional-containers.twig b/php/templates/includes/optional-containers.twig index 8932b3a2..89361ba1 100644 --- a/php/templates/includes/optional-containers.twig +++ b/php/templates/includes/optional-containers.twig @@ -232,7 +232,7 @@ data-initial-state="false" {% endif %} > - +