From 35691c5a74d8093d1bb4629f3d96e27af3690615 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 13 Dec 2025 00:52:01 -0800 Subject: Fix docker stage --- Dockerfile | 5 +---- docker-entrypoint.sh | 10 ++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index ffc3d7c..89746d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,9 @@ -FROM nginx:alpine +FROM nginx:alpine as adelie -# Copy static assets COPY static/ /usr/share/nginx/html/ -# Copy nginx configuration COPY nginx.conf /etc/nginx/nginx.conf -# Copy entrypoint script COPY docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-entrypoint.sh diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 55e2b6c..784a5a0 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,21 +1,15 @@ #!/bin/sh set -e -# If HOST is set, replace /static/ URLs in CSS and JS files if [ ! -z "$HOST" ]; then - # Escape special characters for sed ESCAPED_HOST=$(echo "$HOST" | sed 's/[\/&]/\\&/g') - # Replace /static/ paths in all CSS files find /usr/share/nginx/html -name "*.css" -type f -exec sed -i "s|/static/|${ESCAPED_HOST}/static/|g" {} \; - - # Replace /static/ paths in all JS files find /usr/share/nginx/html -name "*.js" -type f -exec sed -i "s|/static/|${ESCAPED_HOST}/static/|g" {} \; - echo "✓ Updated static URLs to use HOST: $HOST" + echo "Updated static URLs to use HOST: $HOST" else - echo "✓ Serving static assets from /static/ (local, no HOST set)" + echo "Serving static assets from /static/" fi -# Start nginx in foreground exec nginx -g "daemon off;" -- cgit v1.2.3-70-g09d2