2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-23 18:48:58 +00:00

Merge pull request #576 from revant/change-nginx-port

fix: change unpriviliged nginx port from 80 to 8080
This commit is contained in:
Revant Nandgaonkar 2021-11-22 15:18:57 +05:30 committed by GitHub
commit e4ab6945a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 9 deletions

View File

@ -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.template >/etc/nginx/conf.d/default.conf
fi

View File

@ -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;

View File

@ -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

View File

@ -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}

View File

@ -117,4 +117,4 @@ services:
volumes:
assets-vol:
sites-vol:
logs-vol:
logs-vol:

View File

@ -3,4 +3,4 @@ version: "3"
services:
erpnext-nginx:
ports:
- "80:80"
- "80:8080"

View File

@ -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

View File

@ -3,4 +3,4 @@ version: "3"
services:
frappe-nginx:
ports:
- "80:80"
- "80:8080"

View File

@ -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

View File

@ -24,6 +24,14 @@ FRAPPE_VERSION=$FRAPPE_VERSION ERPNEXT_VERSION="test" \
-f installation/erpnext-publish.yml \
up -d
docker run \
--rm \
--user root \
-v ${project_name}_sites-vol:/sites \
-v ${project_name}_assets-vol:/assets \
-v ${project_name}_logs-vol:/logs \
frappe/erpnext-worker:test chown -R 1000:1000 /logs /sites /assets
print_group Create site
docker run \
--rm \