mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-01-11 01:32:10 +00:00
feat: Add a flag to skip generating default NGINX config
This commit is contained in:
parent
c9b1f990ba
commit
147c6b3a97
@ -53,7 +53,15 @@ if [[ -z "$HTTP_HOST" ]]; then
|
|||||||
export HTTP_HOST="\$http_host"
|
export HTTP_HOST="\$http_host"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$SKIP_NGINX_TEMPLATE_GENERATION" ]]; then
|
||||||
|
export SKIP_NGINX_TEMPLATE_GENERATION=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $SKIP_NGINX_TEMPLATE_GENERATION -eq 1 ]]
|
||||||
|
then
|
||||||
|
echo "Skipping default NGINX template generation. Please mount your own NGINX config file inside /etc/nginx/conf.d"
|
||||||
|
else
|
||||||
|
echo "Generating default template"
|
||||||
envsubst '${FRAPPE_PY}
|
envsubst '${FRAPPE_PY}
|
||||||
${FRAPPE_PY_PORT}
|
${FRAPPE_PY_PORT}
|
||||||
${FRAPPE_SOCKETIO}
|
${FRAPPE_SOCKETIO}
|
||||||
@ -65,6 +73,7 @@ envsubst '${FRAPPE_PY}
|
|||||||
${HTTP_HOST}
|
${HTTP_HOST}
|
||||||
${UPSTREAM_REAL_IP_HEADER}' \
|
${UPSTREAM_REAL_IP_HEADER}' \
|
||||||
< /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
|
||||||
|
|
||||||
echo "Waiting for frappe-python to be available on $FRAPPE_PY port $FRAPPE_PY_PORT"
|
echo "Waiting for frappe-python to be available on $FRAPPE_PY port $FRAPPE_PY_PORT"
|
||||||
timeout 10 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' $FRAPPE_PY $FRAPPE_PY_PORT
|
timeout 10 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' $FRAPPE_PY $FRAPPE_PY_PORT
|
||||||
|
@ -26,6 +26,7 @@ These variables are set on every container start. Change in these variables will
|
|||||||
- `UPSTREAM_REAL_IP_HEADER`: Set this to the header name sent by your upstream proxy server to indicate the real IP of connecting clients. Default: X-Forwarded-For
|
- `UPSTREAM_REAL_IP_HEADER`: Set this to the header name sent by your upstream proxy server to indicate the real IP of connecting clients. Default: X-Forwarded-For
|
||||||
- `FRAPPE_SITE_NAME_HEADER`: NGINX `X-Frappe-Site-Name` header in the HTTP request which matches a site name. Default: `$host`
|
- `FRAPPE_SITE_NAME_HEADER`: NGINX `X-Frappe-Site-Name` header in the HTTP request which matches a site name. Default: `$host`
|
||||||
- `HTTP_HOST`: NGINX `Host` header in the HTTP request which matches a site name. Default: `$http_host`
|
- `HTTP_HOST`: NGINX `Host` header in the HTTP request which matches a site name. Default: `$http_host`
|
||||||
|
- `SKIP_NGINX_TEMPLATE_GENERATION`: When set to `1`, this will not generate a default NGINX configuration. The config file must be mounted inside the container (`/etc/nginx/conf.d`) by the user in this case. Default: `0`
|
||||||
|
|
||||||
### frappe-socketio
|
### frappe-socketio
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user