Tidy shit up
This commit is contained in:
@@ -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
|
||||
|
||||
11
build.sh
11
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
|
||||
|
||||
@@ -18,7 +18,7 @@ http {
|
||||
resolver 127.0.0.11 valid=10s;
|
||||
|
||||
server {
|
||||
listen 3001;
|
||||
listen 3000;
|
||||
|
||||
location / {
|
||||
if ($arg_url = "") {
|
||||
|
||||
Reference in New Issue
Block a user