Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -23,12 +23,12 @@ FROM node:18-alpine
|
|
| 23 |
# Install nginx
|
| 24 |
RUN apk add --no-cache nginx
|
| 25 |
|
| 26 |
-
# Configure nginx to
|
| 27 |
-
RUN
|
| 28 |
-
sed -i 's/error_log.*/error_log \/dev\/stderr error;/' /etc/nginx/nginx.conf && \
|
| 29 |
sed -i 's/access_log.*/access_log \/dev\/stdout;/' /etc/nginx/nginx.conf && \
|
| 30 |
sed -i 's/user nginx;//' /etc/nginx/nginx.conf && \
|
| 31 |
-
sed -i '/pid/d' /etc/nginx/nginx.conf
|
|
|
|
| 32 |
|
| 33 |
# Create app directory
|
| 34 |
WORKDIR /app
|
|
|
|
| 23 |
# Install nginx
|
| 24 |
RUN apk add --no-cache nginx
|
| 25 |
|
| 26 |
+
# Configure nginx to redirect logs to stdout/stderr and remove duplicate directives
|
| 27 |
+
RUN sed -i 's/error_log.*/error_log \/dev\/stderr error;/' /etc/nginx/nginx.conf && \
|
|
|
|
| 28 |
sed -i 's/access_log.*/access_log \/dev\/stdout;/' /etc/nginx/nginx.conf && \
|
| 29 |
sed -i 's/user nginx;//' /etc/nginx/nginx.conf && \
|
| 30 |
+
sed -i '/pid/d' /etc/nginx/nginx.conf && \
|
| 31 |
+
sed -i '/daemon off;/d' /etc/nginx/nginx.conf
|
| 32 |
|
| 33 |
# Create app directory
|
| 34 |
WORKDIR /app
|