Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b202226a2 |
@@ -3,9 +3,9 @@ FROM nginx:alpine
|
|||||||
# Copy nginx configuration
|
# Copy nginx configuration
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
# Create cache directory
|
# Create data directories
|
||||||
RUN mkdir -p /var/cache/nginx && \
|
RUN mkdir -p /etc/nginx/data/cache /etc/nginx/data/temp && \
|
||||||
chown nginx:nginx /var/cache/nginx
|
chown -R nginx:nginx /etc/nginx/data
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|||||||
11
build.sh
11
build.sh
@@ -9,16 +9,11 @@ DOCKER_REPO="docker.site.quack-lab.dev"
|
|||||||
IMAGE_NAME="nginx-cache-proxy"
|
IMAGE_NAME="nginx-cache-proxy"
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# VALIDATE CONFIGURATION
|
# BUILD PROJECT
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
echo "Validating nginx configuration..."
|
echo "Building application..."
|
||||||
docker run --rm -v "$(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro" nginx:alpine nginx -t
|
# No build step needed for nginx
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Error validating nginx configuration"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# DOCKER BUILD AND TAG
|
# DOCKER BUILD AND TAG
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ http {
|
|||||||
resolver 127.0.0.11 valid=10s;
|
resolver 127.0.0.11 valid=10s;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 3001;
|
listen 3000;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
if ($arg_url = "") {
|
if ($arg_url = "") {
|
||||||
|
|||||||
Reference in New Issue
Block a user