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) <noreply@anthropic.com>
This commit is contained in:
parent
60e403494e
commit
c59db0e9fd
2 changed files with 25 additions and 4 deletions
|
|
@ -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/"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,22 @@
|
|||
# Solventum Image Metadata Tool — Apache Config Additions
|
||||
# Solventum Image Metadata Tool — Apache Config
|
||||
# Add these directives inside your existing <VirtualHost *:443> 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
|
||||
<Directory /var/www/html/solventum-image-metadata/static>
|
||||
Require all granted
|
||||
Options -Indexes
|
||||
</Directory>
|
||||
|
||||
# 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)
|
||||
<LocationMatch "^/solventum-image-metadata/events/">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue