Modified docker-compose and Dockerfile
This commit is contained in:
parent
88dcbeee45
commit
0c403e67c5
@ -6,7 +6,6 @@ RUN adduser -D -g 'www' www
|
||||
RUN mkdir /www
|
||||
RUN chown -R www:www /var/lib/nginx
|
||||
RUN chown -R www:www /www
|
||||
COPY index.html /www/index.html
|
||||
|
||||
WORKDIR /etc/nginx/
|
||||
COPY nginx/nginx.conf nginx.conf
|
||||
@ -14,13 +13,9 @@ RUN mkdir conf.d/
|
||||
WORKDIR /
|
||||
|
||||
FROM base AS portfolio-proxy
|
||||
WORKDIR /etc/nginx/conf.d/
|
||||
COPY nginx/default-nginx-proxy.conf default.conf
|
||||
EXPOSE 80/tcp
|
||||
CMD ["nginx","-g","daemon off;"]
|
||||
|
||||
FROM base AS portfolio-web
|
||||
WORKDIR /etc/nginx/conf.d/
|
||||
COPY nginx/default-nginx-web.conf default.conf
|
||||
EXPOSE 8080/tcp
|
||||
CMD ["nginx","-g","daemon off;"]
|
||||
|
@ -12,7 +12,9 @@ services:
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
mode: host
|
||||
|
||||
volumes:
|
||||
- ./nginx/default-nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
@ -21,9 +23,12 @@ services:
|
||||
expose:
|
||||
- "8080/tcp"
|
||||
volumes:
|
||||
- ./nginx/default-nginx-web.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- portfolio-www:/www
|
||||
volumes:
|
||||
portfolio-www:
|
||||
external: true
|
||||
name: portfolio-www
|
||||
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /home/admin/portfolio
|
||||
|
Loading…
x
Reference in New Issue
Block a user