diff --git a/build/frappe-nginx/docker-entrypoint.sh b/build/frappe-nginx/docker-entrypoint.sh index 0be9232e..976c4704 100755 --- a/build/frappe-nginx/docker-entrypoint.sh +++ b/build/frappe-nginx/docker-entrypoint.sh @@ -31,6 +31,8 @@ touch /var/www/html/sites/.build -r "$(ls -td /assets/* | head -n 1)" [[ -z "${HTTP_HOST}" ]] && HTTP_HOST="\$http_host" +[[ -z "${WEB_PORT}" ]] && WEB_PORT="8080" + [[ -z "${SKIP_NGINX_TEMPLATE_GENERATION}" ]] && SKIP_NGINX_TEMPLATE_GENERATION='0' if [[ ${SKIP_NGINX_TEMPLATE_GENERATION} == 1 ]]; then @@ -47,7 +49,8 @@ else ${UPSTREAM_REAL_IP_RECURSIVE} ${FRAPPE_SITE_NAME_HEADER} ${HTTP_HOST} - ${UPSTREAM_REAL_IP_HEADER}' \ + ${UPSTREAM_REAL_IP_HEADER} + ${WEB_PORT}' \ /etc/nginx/conf.d/default.conf fi diff --git a/build/frappe-nginx/nginx-default.conf.template b/build/frappe-nginx/nginx-default.conf.template index c3d90614..c3ce9b9f 100644 --- a/build/frappe-nginx/nginx-default.conf.template +++ b/build/frappe-nginx/nginx-default.conf.template @@ -13,7 +13,7 @@ map $http_x_forwarded_proto $proxy_x_forwarded_proto { } server { - listen 80; + listen ${WEB_PORT}; server_name $http_host; root /var/www/html; diff --git a/docker-compose.yml b/docker-compose.yml index 5ca8569b..398c7093 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,7 +44,7 @@ services: - "traefik.http.routers.erpnext-nginx.rule=Host(${SITES})" - "${ENTRYPOINT_LABEL}" - "${CERT_RESOLVER_LABEL}" - - "traefik.http.services.erpnext-nginx.loadbalancer.server.port=80" + - "traefik.http.services.erpnext-nginx.loadbalancer.server.port=8080" volumes: - sites-vol:/var/www/html/sites:rw - assets-vol:/assets:rw diff --git a/docs/docker-swarm.md b/docs/docker-swarm.md index f415e9ee..692d5118 100644 --- a/docs/docker-swarm.md +++ b/docs/docker-swarm.md @@ -167,7 +167,7 @@ services: - "traefik.http.routers.erpnext-nginx-https.entrypoints=https" - "traefik.http.routers.erpnext-nginx-https.tls=true" - "traefik.http.routers.erpnext-nginx-https.tls.certresolver=le" - - "traefik.http.services.erpnext-nginx.loadbalancer.server.port=80" + - "traefik.http.services.erpnext-nginx.loadbalancer.server.port=8080" erpnext-python: image: frappe/erpnext-worker:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set} diff --git a/installation/erpnext-publish.yml b/installation/erpnext-publish.yml index 6975442a..130c52b6 100644 --- a/installation/erpnext-publish.yml +++ b/installation/erpnext-publish.yml @@ -3,4 +3,4 @@ version: "3" services: erpnext-nginx: ports: - - "80:80" + - "80:8080" diff --git a/installation/frappe-postgresql/docker-compose.yml b/installation/frappe-postgresql/docker-compose.yml index 8f479aa2..c36bdb05 100644 --- a/installation/frappe-postgresql/docker-compose.yml +++ b/installation/frappe-postgresql/docker-compose.yml @@ -42,7 +42,7 @@ services: - "traefik.http.routers.frappe-nginx.rule=Host(${SITES})" - "${ENTRYPOINT_LABEL}" - "${CERT_RESOLVER_LABEL}" - - "traefik.http.services.frappe-nginx.loadbalancer.server.port=80" + - "traefik.http.services.frappe-nginx.loadbalancer.server.port=8080" volumes: - sites-vol:/var/www/html/sites:rw - assets-vol:/assets:rw diff --git a/installation/frappe-publish.yml b/installation/frappe-publish.yml index a3f4caa9..f573cb79 100644 --- a/installation/frappe-publish.yml +++ b/installation/frappe-publish.yml @@ -3,4 +3,4 @@ version: "3" services: frappe-nginx: ports: - - "80:80" + - "80:8080" diff --git a/tests/pwd.yml b/tests/pwd.yml index d4cb3550..339900cc 100644 --- a/tests/pwd.yml +++ b/tests/pwd.yml @@ -37,7 +37,7 @@ services: - "traefik.http.middlewares.erpnext-nginx.headers.customrequestheaders.Host=erpnext-nginx" - "traefik.http.routers.erpnext-nginx.middlewares=erpnext-nginx" - "traefik.http.routers.erpnext-nginx.entrypoints=web" - - "traefik.http.services.erpnext-nginx.loadbalancer.server.port=80" + - "traefik.http.services.erpnext-nginx.loadbalancer.server.port=8080" volumes: - sites-vol:/var/www/html/sites:rw - assets-vol:/assets:rw