mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-09 23:00:56 +00:00
e6088af885
* ci: skip frappe builds * refactor: build only one frappe/erpnext image * fix: lint nginx entrypoint script * docs: update and organize docs * docs: fix lint errors * fix(custom): pass base64 encoded apps json * ci: update dependabot * docs: update contributing * docs: remove info about multi image setup * fix: initiate empty common_site_config.json default config has host keys set to localhost causes connection errors * docs: add details for pwd volumes * fix: symlink assets instead of copy * fix: nginx private files * ci: skip docker compose v2 install for ubuntu-latest * fix: organize layers * feat: allow remove git remote for custom image * docs: allow remove git remote for custom image * fix: remove duplicate --apps_path
53 lines
1.5 KiB
Bash
Executable File
53 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Set variables that do not exist
|
|
if [[ -z "$BACKEND" ]]; then
|
|
echo "BACKEND defaulting to 0.0.0.0:8000"
|
|
export BACKEND=0.0.0.0:8000
|
|
fi
|
|
if [[ -z "$SOCKETIO" ]]; then
|
|
echo "SOCKETIO defaulting to 0.0.0.0:9000"
|
|
export SOCKETIO=0.0.0.0:9000
|
|
fi
|
|
if [[ -z "$UPSTREAM_REAL_IP_ADDRESS" ]]; then
|
|
echo "UPSTREAM_REAL_IP_ADDRESS defaulting to 127.0.0.1"
|
|
export UPSTREAM_REAL_IP_ADDRESS=127.0.0.1
|
|
fi
|
|
if [[ -z "$UPSTREAM_REAL_IP_HEADER" ]]; then
|
|
echo "UPSTREAM_REAL_IP_HEADER defaulting to X-Forwarded-For"
|
|
export UPSTREAM_REAL_IP_HEADER=X-Forwarded-For
|
|
fi
|
|
if [[ -z "$UPSTREAM_REAL_IP_RECURSIVE" ]]; then
|
|
echo "UPSTREAM_REAL_IP_RECURSIVE defaulting to off"
|
|
export UPSTREAM_REAL_IP_RECURSIVE=off
|
|
fi
|
|
if [[ -z "$FRAPPE_SITE_NAME_HEADER" ]]; then
|
|
# shellcheck disable=SC2016
|
|
echo 'FRAPPE_SITE_NAME_HEADER defaulting to $host'
|
|
# shellcheck disable=SC2016
|
|
export FRAPPE_SITE_NAME_HEADER='$host'
|
|
fi
|
|
|
|
if [[ -z "$PROXY_READ_TIMEOUT" ]]; then
|
|
echo "PROXY_READ_TIMEOUT defaulting to 120"
|
|
export PROXY_READ_TIMEOUT=120
|
|
fi
|
|
|
|
if [[ -z "$CLIENT_MAX_BODY_SIZE" ]]; then
|
|
echo "CLIENT_MAX_BODY_SIZE defaulting to 50m"
|
|
export CLIENT_MAX_BODY_SIZE=50m
|
|
fi
|
|
|
|
# shellcheck disable=SC2016
|
|
envsubst '${BACKEND}
|
|
${SOCKETIO}
|
|
${UPSTREAM_REAL_IP_ADDRESS}
|
|
${UPSTREAM_REAL_IP_HEADER}
|
|
${UPSTREAM_REAL_IP_RECURSIVE}
|
|
${FRAPPE_SITE_NAME_HEADER}
|
|
${PROXY_READ_TIMEOUT}
|
|
${CLIENT_MAX_BODY_SIZE}' \
|
|
</templates/nginx/frappe.conf.template >/etc/nginx/conf.d/frappe.conf
|
|
|
|
nginx -g 'daemon off;'
|