From 2aeec9899f107c919823e80bcc37394a4af7defe Mon Sep 17 00:00:00 2001 From: Christian Anetzberger Date: Sat, 14 Nov 2026 09:54:27 +0100 Subject: [PATCH] Added example override just for reference --- .gitignore | 16 ++-- docker-compose.override.example.yml | 113 ++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 7 deletions(-) create mode 100644 docker-compose.override.example.yml diff --git a/.gitignore b/.gitignore index 149264d..04eea47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,18 @@ -# Frappe Docker upstream repository -/frappe_repo/ - -# Production environment and secrets +# Environment-specific configuration .env .env.* !.env.example -# Temporary build files +# Generated and local Docker Compose files +/docker-compose.yml +/docker-compose.override.yml + +# Frappe Docker checkout +/frappe_repo/ + +# Temporary files /apps.json # macOS .DS_Store - -/docker-compose.yml diff --git a/docker-compose.override.example.yml b/docker-compose.override.example.yml new file mode 100644 index 0000000..ae7cbf5 --- /dev/null +++ b/docker-compose.override.example.yml @@ -0,0 +1,113 @@ +# -------------------------------------------------- +# ERPNext Docker Compose Override +# Environment-specific settings are loaded from .env +# -------------------------------------------------- + +name: ${COMPOSE_PROJECT_NAME:?COMPOSE_PROJECT_NAME not set} + +# -------------------------------------------------- +# Custom ERPNext image +# -------------------------------------------------- + +x-erpnext-image: &erpnext-image + image: ${CUSTOM_IMAGE:?CUSTOM_IMAGE not set}:${CUSTOM_TAG:?CUSTOM_TAG not set} + pull_policy: always + +services: + # ------------------------------------------------ + # Configurator + # ------------------------------------------------ + + configurator: + <<: *erpnext-image + + # ------------------------------------------------ + # Backend + # ------------------------------------------------ + + backend: + <<: *erpnext-image + environment: + GUNICORN_THREADS: "${GUNICORN_THREADS:-4}" + GUNICORN_WORKERS: "${GUNICORN_WORKERS:-2}" + GUNICORN_TIMEOUT: "${GUNICORN_TIMEOUT:-120}" + + # ------------------------------------------------ + # Frontend / Nginx / Traefik + # ------------------------------------------------ + + frontend: + <<: *erpnext-image + + environment: + NGINX_LISTEN_PORT: "${NGINX_LISTEN_PORT:-8080}" + FRAPPE_SITE_NAME_HEADER: ${FRAPPE_SITE_NAME_HEADER:-$$host} + UPSTREAM_REAL_IP_ADDRESS: ${UPSTREAM_REAL_IP_ADDRESS:-127.0.0.1} + UPSTREAM_REAL_IP_HEADER: ${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For} + UPSTREAM_REAL_IP_RECURSIVE: ${UPSTREAM_REAL_IP_RECURSIVE:-off} + PROXY_READ_TIMEOUT: "${PROXY_READ_TIMEOUT:-120}" + CLIENT_MAX_BODY_SIZE: ${CLIENT_MAX_BODY_SIZE:-50m} + + networks: + - default + - proxy + + labels: + - "traefik.enable=true" + - "traefik.docker.network=proxy" + + # HTTPS + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-secure.entrypoints=websecure" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-secure.rule=${SITES_RULE:?SITES_RULE not set}" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-secure.middlewares=default@file" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-secure.service=${COMPOSE_PROJECT_NAME}" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-secure.tls=true" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-secure.tls.certresolver=http_resolver" + + # HTTP + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=${SITES_RULE:?SITES_RULE not set}" + - "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.service=${COMPOSE_PROJECT_NAME}" + + # Internal Nginx + - "traefik.http.services.${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=8080" + + # ------------------------------------------------ + # Websocket + # ------------------------------------------------ + + websocket: + <<: *erpnext-image + + # ------------------------------------------------ + # Background workers + # ------------------------------------------------ + + queue-short: + <<: *erpnext-image + + queue-long: + <<: *erpnext-image + + # ------------------------------------------------ + # Scheduler + # ------------------------------------------------ + + scheduler: + <<: *erpnext-image + + # ------------------------------------------------ + # Dedicated MariaDB + # ------------------------------------------------ + + db: + environment: + MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD not set} + +# -------------------------------------------------- +# External Traefik network +# -------------------------------------------------- + +networks: + proxy: + external: true