2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-14 00:54:07 +00:00

Use nginxinc/nginx-unprivileged instead of nginx image

Also use Ngnix 1.20 instead of unstable 1.21
This commit is contained in:
Lev Vereshchagin 2021-12-20 10:42:35 +03:00
parent 22d317637a
commit ad45a5268e
3 changed files with 5 additions and 4 deletions

View File

@ -67,8 +67,7 @@ FROM base as error_pages
RUN git clone --depth 1 https://github.com/frappe/bench /root/bench RUN git clone --depth 1 https://github.com/frappe/bench /root/bench
FROM nginxinc/nginx-unprivileged:1.20-alpine as frappe
FROM nginx:1.21-alpine as frappe
COPY --from=error_pages /root/bench/bench/config/templates/502.html /usr/share/nginx/html COPY --from=error_pages /root/bench/bench/config/templates/502.html /usr/share/nginx/html
COPY --from=base /root/frappe-bench/apps/frappe/frappe/public /usr/share/nginx/html/assets/frappe COPY --from=base /root/frappe-bench/apps/frappe/frappe/public /usr/share/nginx/html/assets/frappe
@ -77,6 +76,8 @@ COPY --from=frappe_assets /root/frappe-bench/sites /usr/share/nginx/html
COPY nginx-template.conf / COPY nginx-template.conf /
USER 1001
CMD [ "/bin/sh" , "-c" , "envsubst '${BACKEND} ${SOCKETIO} ${FRAPPE_SITE_NAME_HEADER}' </nginx-template.conf >/etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'" ] CMD [ "/bin/sh" , "-c" , "envsubst '${BACKEND} ${SOCKETIO} ${FRAPPE_SITE_NAME_HEADER}' </nginx-template.conf >/etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'" ]

View File

@ -7,7 +7,7 @@ upstream socketio-server {
} }
server { server {
listen 80; listen 8080;
server_name $http_host; server_name $http_host;
root /usr/share/nginx/html; root /usr/share/nginx/html;

View File

@ -65,7 +65,7 @@ services:
- websocket - websocket
labels: labels:
- traefik.enable=true - traefik.enable=true
- traefik.http.services.frontend.loadbalancer.server.port=80 - traefik.http.services.frontend.loadbalancer.server.port=8080
- traefik.http.routers.frontend-http.entrypoints=web - traefik.http.routers.frontend-http.entrypoints=web
- traefik.http.routers.frontend-http.rule=HostRegexp(`{any:.+}`) - traefik.http.routers.frontend-http.rule=HostRegexp(`{any:.+}`)