mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-24 02:55:29 +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:
commit
e4ab6945a4
@ -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 "${HTTP_HOST}" ]] && HTTP_HOST="\$http_host"
|
||||||
|
|
||||||
|
[[ -z "${WEB_PORT}" ]] && WEB_PORT="8080"
|
||||||
|
|
||||||
[[ -z "${SKIP_NGINX_TEMPLATE_GENERATION}" ]] && SKIP_NGINX_TEMPLATE_GENERATION='0'
|
[[ -z "${SKIP_NGINX_TEMPLATE_GENERATION}" ]] && SKIP_NGINX_TEMPLATE_GENERATION='0'
|
||||||
|
|
||||||
if [[ ${SKIP_NGINX_TEMPLATE_GENERATION} == 1 ]]; then
|
if [[ ${SKIP_NGINX_TEMPLATE_GENERATION} == 1 ]]; then
|
||||||
@ -47,7 +49,8 @@ else
|
|||||||
${UPSTREAM_REAL_IP_RECURSIVE}
|
${UPSTREAM_REAL_IP_RECURSIVE}
|
||||||
${FRAPPE_SITE_NAME_HEADER}
|
${FRAPPE_SITE_NAME_HEADER}
|
||||||
${HTTP_HOST}
|
${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
|
</etc/nginx/conf.d/default.conf.template >/etc/nginx/conf.d/default.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ map $http_x_forwarded_proto $proxy_x_forwarded_proto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen ${WEB_PORT};
|
||||||
server_name $http_host;
|
server_name $http_host;
|
||||||
root /var/www/html;
|
root /var/www/html;
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ services:
|
|||||||
- "traefik.http.routers.erpnext-nginx.rule=Host(${SITES})"
|
- "traefik.http.routers.erpnext-nginx.rule=Host(${SITES})"
|
||||||
- "${ENTRYPOINT_LABEL}"
|
- "${ENTRYPOINT_LABEL}"
|
||||||
- "${CERT_RESOLVER_LABEL}"
|
- "${CERT_RESOLVER_LABEL}"
|
||||||
- "traefik.http.services.erpnext-nginx.loadbalancer.server.port=80"
|
- "traefik.http.services.erpnext-nginx.loadbalancer.server.port=8080"
|
||||||
volumes:
|
volumes:
|
||||||
- sites-vol:/var/www/html/sites:rw
|
- sites-vol:/var/www/html/sites:rw
|
||||||
- assets-vol:/assets:rw
|
- assets-vol:/assets:rw
|
||||||
|
@ -167,7 +167,7 @@ services:
|
|||||||
- "traefik.http.routers.erpnext-nginx-https.entrypoints=https"
|
- "traefik.http.routers.erpnext-nginx-https.entrypoints=https"
|
||||||
- "traefik.http.routers.erpnext-nginx-https.tls=true"
|
- "traefik.http.routers.erpnext-nginx-https.tls=true"
|
||||||
- "traefik.http.routers.erpnext-nginx-https.tls.certresolver=le"
|
- "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:
|
erpnext-python:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set}
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set}
|
||||||
|
@ -117,4 +117,4 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
assets-vol:
|
assets-vol:
|
||||||
sites-vol:
|
sites-vol:
|
||||||
logs-vol:
|
logs-vol:
|
||||||
|
@ -3,4 +3,4 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
erpnext-nginx:
|
erpnext-nginx:
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:8080"
|
||||||
|
@ -42,7 +42,7 @@ services:
|
|||||||
- "traefik.http.routers.frappe-nginx.rule=Host(${SITES})"
|
- "traefik.http.routers.frappe-nginx.rule=Host(${SITES})"
|
||||||
- "${ENTRYPOINT_LABEL}"
|
- "${ENTRYPOINT_LABEL}"
|
||||||
- "${CERT_RESOLVER_LABEL}"
|
- "${CERT_RESOLVER_LABEL}"
|
||||||
- "traefik.http.services.frappe-nginx.loadbalancer.server.port=80"
|
- "traefik.http.services.frappe-nginx.loadbalancer.server.port=8080"
|
||||||
volumes:
|
volumes:
|
||||||
- sites-vol:/var/www/html/sites:rw
|
- sites-vol:/var/www/html/sites:rw
|
||||||
- assets-vol:/assets:rw
|
- assets-vol:/assets:rw
|
||||||
|
@ -3,4 +3,4 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
frappe-nginx:
|
frappe-nginx:
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:8080"
|
||||||
|
@ -37,7 +37,7 @@ services:
|
|||||||
- "traefik.http.middlewares.erpnext-nginx.headers.customrequestheaders.Host=erpnext-nginx"
|
- "traefik.http.middlewares.erpnext-nginx.headers.customrequestheaders.Host=erpnext-nginx"
|
||||||
- "traefik.http.routers.erpnext-nginx.middlewares=erpnext-nginx"
|
- "traefik.http.routers.erpnext-nginx.middlewares=erpnext-nginx"
|
||||||
- "traefik.http.routers.erpnext-nginx.entrypoints=web"
|
- "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:
|
volumes:
|
||||||
- sites-vol:/var/www/html/sites:rw
|
- sites-vol:/var/www/html/sites:rw
|
||||||
- assets-vol:/assets:rw
|
- assets-vol:/assets:rw
|
||||||
|
@ -24,6 +24,14 @@ FRAPPE_VERSION=$FRAPPE_VERSION ERPNEXT_VERSION="test" \
|
|||||||
-f installation/erpnext-publish.yml \
|
-f installation/erpnext-publish.yml \
|
||||||
up -d
|
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
|
print_group Create site
|
||||||
docker run \
|
docker run \
|
||||||
--rm \
|
--rm \
|
||||||
|
Loading…
Reference in New Issue
Block a user