Build nginx image with static files baked in; remove host bind mounts
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
webserver:
|
webserver:
|
||||||
image: nginx:alpine
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: nginx/Dockerfile
|
||||||
container_name: nginx_webserver
|
container_name: nginx_webserver
|
||||||
volumes:
|
volumes:
|
||||||
- ./html:/usr/share/nginx/html:ro
|
- nginx_logs:/var/log/nginx
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
|
||||||
- ./logs:/var/log/nginx
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
api:
|
api:
|
||||||
@@ -47,6 +47,7 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
nginx_logs:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
|
|||||||
3
nginx/Dockerfile
Normal file
3
nginx/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
COPY nginx/conf.d/wp-suite.conf /etc/nginx/conf.d/wp-suite.conf
|
||||||
|
COPY html/ /usr/share/nginx/html/
|
||||||
Reference in New Issue
Block a user