Skip to content

Commit 0e5fd7e

Browse files
committed
Remove the nginx config from the image and mounts as volume
1 parent 0477584 commit 0e5fd7e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

apps/nginx/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ RUN set -ex && \
2828
mkdir -p /var/cache/nginx && \
2929
chown -R nginx.nginx /var/cache/nginx && \
3030
#
31+
# Create default pid dir
32+
mkdir -p /var/run/nginx && \
33+
#
3134
# Forward request and error logs to docker log collector
3235
ln -sf /dev/stdout /var/log/nginx/access.log && \
3336
ln -sf /dev/stderr /var/log/nginx/error.log
3437

35-
ADD nginx_conf /etc/nginx/
36-
3738
EXPOSE 80
3839

3940
STOPSIGNAL SIGTERM

docker-stack.yml

+2
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ services:
9393
depends_on:
9494
- wordpress
9595
volumes:
96+
- ./apps/nginx/nginx_conf/nginx.conf:/etc/nginx/nginx.conf
97+
- ./apps/nginx/nginx_conf/conf.d/default.conf:/etc/nginx/conf.d/default.conf
9698
- wp_data:/var/www/html
9799
networks:
98100
- nw-backend

0 commit comments

Comments
 (0)