diff --git a/Dockerfile b/Dockerfile index f55a7d7..968b97d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ FROM nginx:alpine # Copy nginx configuration COPY nginx.conf /etc/nginx/nginx.conf -# Create cache directory -RUN mkdir -p /var/cache/nginx && \ - chown nginx:nginx /var/cache/nginx +# Create data directories +RUN mkdir -p /etc/nginx/data/cache /etc/nginx/data/temp && \ + chown -R nginx:nginx /etc/nginx/data # Expose port EXPOSE 3000 diff --git a/build.sh b/build.sh index bd3e4d0..3bd9a60 100644 --- a/build.sh +++ b/build.sh @@ -9,16 +9,11 @@ DOCKER_REPO="docker.site.quack-lab.dev" IMAGE_NAME="nginx-cache-proxy" # ============================================================================ -# VALIDATE CONFIGURATION +# BUILD PROJECT # ============================================================================ -echo "Validating nginx configuration..." -docker run --rm -v "$(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro" nginx:alpine nginx -t - -if [ $? -ne 0 ]; then - echo "Error validating nginx configuration" - exit 1 -fi +echo "Building application..." +# No build step needed for nginx # ============================================================================ # DOCKER BUILD AND TAG diff --git a/nginx.conf b/nginx.conf index 2977df5..59b187d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -18,7 +18,7 @@ http { resolver 127.0.0.11 valid=10s; server { - listen 3001; + listen 3000; location / { if ($arg_url = "") {