From c59db0e9fd92fa29dbc42e232757b0d23527f7f2 Mon Sep 17 00:00:00 2001 From: SamoilenkoVadym Date: Mon, 9 Feb 2026 21:50:02 +0000 Subject: [PATCH] Serve static files via Apache, not Docker - deploy.sh copies static/ to /var/www/html/solventum-image-metadata/ - Apache Alias serves CSS/JS directly from disk - ProxyPass exclusion prevents static requests going to Docker - Updated apache config with full working example Co-Authored-By: Claude Opus 4.6 (1M context) --- deploy.sh | 8 ++++++++ deploy/apache-solventum-metadata.conf | 21 +++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index 97aa679..2eb3698 100755 --- a/deploy.sh +++ b/deploy.sh @@ -77,6 +77,14 @@ if [ "$HEALTHY" = false ]; then exit 1 fi +# 6. Deploy static files for Apache to serve directly +WEB_DIR="/var/www/html/solventum-image-metadata" +echo ">>> Deploying static files to $WEB_DIR..." +sudo rm -rf "$WEB_DIR/static" +sudo mkdir -p "$WEB_DIR" +sudo cp -r "$SCRIPT_DIR/static" "$WEB_DIR/static" +sudo chown -R www-data:www-data "$WEB_DIR" + echo "" echo "=== Deploy complete ===" echo "URL: https://ai-sandbox.oliver.solutions/solventum-image-metadata/" diff --git a/deploy/apache-solventum-metadata.conf b/deploy/apache-solventum-metadata.conf index 3b6f095..3953124 100644 --- a/deploy/apache-solventum-metadata.conf +++ b/deploy/apache-solventum-metadata.conf @@ -1,9 +1,22 @@ -# Solventum Image Metadata Tool — Apache Config Additions +# Solventum Image Metadata Tool — Apache Config # Add these directives inside your existing for ai-sandbox.oliver.solutions # -# The main reverse proxy rule is already configured: -# ProxyPass /solventum-image-metadata/ http://localhost:5001/ -# ProxyPassReverse /solventum-image-metadata/ http://localhost:5001/ +# IMPORTANT: The static files Alias and "ProxyPass ... !" exclusion +# MUST come BEFORE the main ProxyPass rule. + +# Serve static files directly from disk (fast, bypasses Docker) +Alias /solventum-image-metadata/static /var/www/html/solventum-image-metadata/static + + Require all granted + Options -Indexes + + +# Exclude static from proxy (Apache serves them directly) +ProxyPass /solventum-image-metadata/static ! + +# Proxy everything else to Docker container +ProxyPass /solventum-image-metadata/ http://localhost:5001/ +ProxyPassReverse /solventum-image-metadata/ http://localhost:5001/ # SSE support (disable buffering for realtime AI progress events)