From 4c7dca70b2122c6dc199e2c3a90f875734f19ee7 Mon Sep 17 00:00:00 2001 From: zhaojing1987 Date: Thu, 12 Mar 2026 11:22:22 +0800 Subject: [PATCH] feat: update erpnext and kafka configs --- apps/erpnext/.env | 3 +- apps/erpnext/CHANGELOG.md | 17 ++- apps/erpnext/Notes.md | 5 + apps/erpnext/README.md | 2 +- apps/erpnext/docker-compose.yml | 78 +++++++--- apps/erpnext/src/after_up.sh | 2 +- apps/erpnext/src/compose.yaml | 144 +++++++++--------- apps/erpnext/src/encrypt.sh | 24 +-- apps/erpnext/src/example.env | 78 +++++----- apps/erpnext/src/filelist | 6 +- apps/erpnext/src/get_version.sh | 2 +- .../src/overrides/compose.erpnext.yaml | 48 +++--- .../src/overrides/compose.mariadb.yaml | 54 +++---- .../src/overrides/compose.noproxy.yaml | 8 +- apps/erpnext/src/overrides/compose.redis.yaml | 32 ++-- apps/erpnext/variables.json | 6 +- apps/kafka/.env | 38 +++-- apps/kafka/CHANGELOG.md | 4 + apps/kafka/README.md | 2 +- apps/kafka/docker-compose.yml | 28 +++- apps/kafka/variables.json | 13 +- 21 files changed, 343 insertions(+), 251 deletions(-) mode change 100644 => 100755 apps/erpnext/src/after_up.sh mode change 100644 => 100755 apps/erpnext/src/compose.yaml mode change 100644 => 100755 apps/erpnext/src/encrypt.sh mode change 100644 => 100755 apps/erpnext/src/example.env mode change 100644 => 100755 apps/erpnext/src/filelist mode change 100644 => 100755 apps/erpnext/src/get_version.sh mode change 100644 => 100755 apps/erpnext/src/overrides/compose.erpnext.yaml mode change 100644 => 100755 apps/erpnext/src/overrides/compose.mariadb.yaml mode change 100644 => 100755 apps/erpnext/src/overrides/compose.noproxy.yaml mode change 100644 => 100755 apps/erpnext/src/overrides/compose.redis.yaml diff --git a/apps/erpnext/.env b/apps/erpnext/.env index 8261a7409..7e42258b4 100644 --- a/apps/erpnext/.env +++ b/apps/erpnext/.env @@ -1,6 +1,7 @@ W9_REPO=frappe/erpnext W9_DIST=community -W9_VERSION=v15.34.1 +W9_VERSION=v16.7.3 +W9_HRMS_BRANCH=version-16 W9_ID=erpnext W9_POWER_PASSWORD=1PrMxExC45LsCT diff --git a/apps/erpnext/CHANGELOG.md b/apps/erpnext/CHANGELOG.md index 582cf46c5..3bc88aef0 100644 --- a/apps/erpnext/CHANGELOG.md +++ b/apps/erpnext/CHANGELOG.md @@ -1,5 +1,16 @@ -# CHANGELOG +# Changelog -## Release -### Fixes and Enhancements +All notable changes to this project will be documented in this file. + +The format is based on Keep a Changelog, and this project follows Semantic Versioning. + +## [16.0.0] - 2026-03-12 + +### Changed + +- Upgraded ERPNext to v16. + +### Added + +- Added the HR module introduced in ERPNext v16. diff --git a/apps/erpnext/Notes.md b/apps/erpnext/Notes.md index 7ce581796..346a83324 100644 --- a/apps/erpnext/Notes.md +++ b/apps/erpnext/Notes.md @@ -47,6 +47,11 @@ password: admin 这是怎么回事呢?通过官方的论坛中研究,发现这是文档更新不及时导致,也就是说overrides中的安装在文档中还没有体现,虽然它更具有效率。 +### 安装完成后执行命令,同步hrms资源,解决图片不显示 +``` +docker compose exec frontend bash -lc 'set -euxo pipefail; cd /home/frappe/frappe-bench; id; ls -ld apps/hrms/hrms/public; mkdir -p sites/assets/hrms; cp -a apps/hrms/hrms/public/. sites/assets/hrms/; ls -lah sites/assets/hrms; ls -lah sites/assets/hrms/images/frappe-hr-logo.svg' +``` + #### 与URL有关的变量有那些? ``` diff --git a/apps/erpnext/README.md b/apps/erpnext/README.md index c1702b342..7a3e0bdeb 100644 --- a/apps/erpnext/README.md +++ b/apps/erpnext/README.md @@ -3,7 +3,7 @@ This is an **[Docker Compose template](https://github.com/Websoft9/docker-library)** powered by [Websoft9](https://www.websoft9.com) based on Docker for ERPNext: - - community: v15, v14, v13 + - community: v16, v15, v14 ## System Requirements diff --git a/apps/erpnext/docker-compose.yml b/apps/erpnext/docker-compose.yml index 87b5e80e4..9bb9544ce 100644 --- a/apps/erpnext/docker-compose.yml +++ b/apps/erpnext/docker-compose.yml @@ -2,14 +2,17 @@ # new image: https://hub.docker.com/r/frappe/erpnext/tags # docs: https://github.com/frappe/frappe_docker/blob/main/pwd.yml -version: '3.8' - services: backend: image: $W9_REPO:$W9_VERSION container_name: $W9_ID-backend + depends_on: + create-site: + condition: service_completed_successfully restart: unless-stopped volumes: + - apps:/home/frappe/frappe-bench/apps + - env:/home/frappe/frappe-bench/env - sites:/home/frappe/frappe-bench/sites - logs:/home/frappe/frappe-bench/logs @@ -23,13 +26,7 @@ services: # add redis_socketio for backward compatibility command: - > - ls -1 apps > sites/apps.txt; - bench set-config -g db_host $$DB_HOST; - bench set-config -gp db_port $$DB_PORT; - bench set-config -g redis_cache "redis://$$REDIS_CACHE"; - bench set-config -g redis_queue "redis://$$REDIS_QUEUE"; - bench set-config -g redis_socketio "redis://$$REDIS_QUEUE"; - bench set-config -gp socketio_port $$SOCKETIO_PORT; + ls -1 apps > sites/apps.txt; bench set-config -g db_host $$DB_HOST; bench set-config -gp db_port $$DB_PORT; bench set-config -g redis_cache "redis://$$REDIS_CACHE"; bench set-config -g redis_queue "redis://$$REDIS_QUEUE"; bench set-config -g redis_socketio "redis://$$REDIS_QUEUE"; bench set-config -gp socketio_port $$SOCKETIO_PORT; environment: DB_HOST: $W9_ID-mariadb DB_PORT: "3306" @@ -37,6 +34,8 @@ services: REDIS_QUEUE: $W9_ID-redis-queue:6379 SOCKETIO_PORT: "9000" volumes: + - apps:/home/frappe/frappe-bench/apps + - env:/home/frappe/frappe-bench/env - sites:/home/frappe/frappe-bench/sites - logs:/home/frappe/frappe-bench/logs @@ -45,6 +44,8 @@ services: container_name: $W9_ID-create-site restart: none volumes: + - apps:/home/frappe/frappe-bench/apps + - env:/home/frappe/frappe-bench/env - sites:/home/frappe/frappe-bench/sites - logs:/home/frappe/frappe-bench/logs entrypoint: @@ -52,11 +53,7 @@ services: - -c command: - > - wait-for-it -t 120 $W9_ID-mariadb:3306; - wait-for-it -t 120 $W9_ID-redis-cache:6379; - wait-for-it -t 120 $W9_ID-redis-queue:6379; - export start=`date +%s`; - until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \ + set -e; wait-for-it -t 120 $W9_ID-mariadb:3306; wait-for-it -t 120 $W9_ID-redis-cache:6379; wait-for-it -t 120 $W9_ID-redis-queue:6379; export start=`date +%s`; until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \ [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \ [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]]; do @@ -66,9 +63,24 @@ services: echo "could not find sites/common_site_config.json with required keys"; exit 1 fi - done; - echo "sites/common_site_config.json found"; - bench new-site --no-mariadb-socket --admin-password=$W9_LOGIN_PASSWORD --db-root-password=$W9_LOGIN_PASSWORD --install-app erpnext --set-default frontend; + done; echo "sites/common_site_config.json found"; if [ ! -d sites/frontend ]; then + bench new-site --mariadb-user-host-login-scope='%' --admin-password=$W9_LOGIN_PASSWORD --db-root-username=root --db-root-password=$W9_LOGIN_PASSWORD --install-app erpnext --set-default frontend; + else + echo "Site frontend already exists, skip new-site"; + fi; if [ ! -d apps/hrms ]; then + bench get-app --branch $W9_HRMS_BRANCH hrms; + fi; bench pip install -e apps/hrms; ls -1 apps > sites/apps.txt; if ! bench --site frontend list-apps | grep -qx hrms; then + bench --site frontend install-app hrms; + else + echo "HRMS already installed on frontend"; + fi; mkdir -p sites/assets; rm -rf sites/assets/hrms; cp -a /home/frappe/frappe-bench/apps/hrms/hrms/public sites/assets/hrms; if command -v node >/dev/null 2>&1; then + bench build --app hrms; + else + echo "node not found, skip bench build --app hrms"; + fi; if [ ! -f sites/assets/hrms/images/frappe-hr-logo.svg ]; then + echo "ERROR: HRMS asset missing after build: sites/assets/hrms/images/frappe-hr-logo.svg"; + exit 1; + fi; bench --site frontend migrate; bench --site frontend clear-cache; bench --site frontend clear-website-cache; mariadb: image: mariadb:$W9_DB_VERSION @@ -92,9 +104,12 @@ services: image: $W9_REPO:$W9_VERSION container_name: $W9_ID depends_on: - - websocket + create-site: + condition: service_completed_successfully + websocket: + condition: service_started restart: unless-stopped - env_file: + env_file: - .env command: - nginx-entrypoint.sh @@ -108,6 +123,8 @@ services: PROXY_READ_TIMEOUT: 120 CLIENT_MAX_BODY_SIZE: 50m volumes: + - apps:/home/frappe/frappe-bench/apps + - env:/home/frappe/frappe-bench/env - sites:/home/frappe/frappe-bench/sites - logs:/home/frappe/frappe-bench/logs ports: @@ -116,6 +133,9 @@ services: queue-long: image: $W9_REPO:$W9_VERSION container_name: $W9_ID-queue-long + depends_on: + create-site: + condition: service_completed_successfully restart: unless-stopped command: - bench @@ -123,12 +143,17 @@ services: - --queue - long,default,short volumes: + - apps:/home/frappe/frappe-bench/apps + - env:/home/frappe/frappe-bench/env - sites:/home/frappe/frappe-bench/sites - logs:/home/frappe/frappe-bench/logs queue-short: image: $W9_REPO:$W9_VERSION container_name: $W9_ID-queue-short + depends_on: + create-site: + condition: service_completed_successfully restart: unless-stopped command: - bench @@ -136,6 +161,8 @@ services: - --queue - short,default volumes: + - apps:/home/frappe/frappe-bench/apps + - env:/home/frappe/frappe-bench/env - sites:/home/frappe/frappe-bench/sites - logs:/home/frappe/frappe-bench/logs @@ -156,32 +183,45 @@ services: scheduler: image: $W9_REPO:$W9_VERSION container_name: $W9_ID-scheduler + depends_on: + create-site: + condition: service_completed_successfully restart: unless-stopped command: - bench - schedule volumes: + - apps:/home/frappe/frappe-bench/apps + - env:/home/frappe/frappe-bench/env - sites:/home/frappe/frappe-bench/sites - logs:/home/frappe/frappe-bench/logs websocket: image: $W9_REPO:$W9_VERSION container_name: $W9_ID-websocket + depends_on: + create-site: + condition: service_completed_successfully restart: unless-stopped command: - node - /home/frappe/frappe-bench/apps/frappe/socketio.js volumes: + - apps:/home/frappe/frappe-bench/apps + - env:/home/frappe/frappe-bench/env - sites:/home/frappe/frappe-bench/sites - logs:/home/frappe/frappe-bench/logs volumes: + apps: + env: db-data: redis-queue-data: redis-cache-data: sites: logs: + networks: default: name: $W9_NETWORK diff --git a/apps/erpnext/src/after_up.sh b/apps/erpnext/src/after_up.sh old mode 100644 new mode 100755 index 8b1378917..d3f5a12fa --- a/apps/erpnext/src/after_up.sh +++ b/apps/erpnext/src/after_up.sh @@ -1 +1 @@ - + diff --git a/apps/erpnext/src/compose.yaml b/apps/erpnext/src/compose.yaml old mode 100644 new mode 100755 index 2916c38e4..85f029319 --- a/apps/erpnext/src/compose.yaml +++ b/apps/erpnext/src/compose.yaml @@ -1,72 +1,72 @@ -x-depends-on-configurator: &depends_on_configurator - depends_on: - configurator: - condition: service_completed_successfully - -x-backend-defaults: &backend_defaults - <<: *depends_on_configurator - image: frappe/frappe-worker:${FRAPPE_VERSION:?No Frappe version set} - volumes: - - sites:/home/frappe/frappe-bench/sites - -services: - configurator: - <<: *backend_defaults - command: configure.py - environment: - DB_HOST: ${DB_HOST} - DB_PORT: ${DB_PORT} - REDIS_CACHE: ${REDIS_CACHE} - REDIS_QUEUE: ${REDIS_QUEUE} - REDIS_SOCKETIO: ${REDIS_SOCKETIO} - SOCKETIO_PORT: 9000 - depends_on: {} - - backend: - <<: *backend_defaults - volumes: - - sites:/home/frappe/frappe-bench/sites - - assets:/home/frappe/frappe-bench/sites/assets:ro - - frontend: - image: frappe/frappe-nginx:${FRAPPE_VERSION} - environment: - BACKEND: backend:8000 - SOCKETIO: websocket:9000 - 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} - volumes: - - sites:/usr/share/nginx/html/sites - - assets:/usr/share/nginx/html/assets - depends_on: - - backend - - websocket - - websocket: - <<: *depends_on_configurator - image: frappe/frappe-socketio:${FRAPPE_VERSION} - volumes: - - sites:/home/frappe/frappe-bench/sites - - queue-short: - <<: *backend_defaults - command: bench worker --queue short - - queue-default: - <<: *backend_defaults - command: bench worker --queue default - - queue-long: - <<: *backend_defaults - command: bench worker --queue long - - scheduler: - <<: *backend_defaults - command: bench schedule - -# ERPNext requires local assets access (Frappe does not) -volumes: - sites: - assets: +x-depends-on-configurator: &depends_on_configurator + depends_on: + configurator: + condition: service_completed_successfully + +x-backend-defaults: &backend_defaults + <<: *depends_on_configurator + image: frappe/frappe-worker:${FRAPPE_VERSION:?No Frappe version set} + volumes: + - sites:/home/frappe/frappe-bench/sites + +services: + configurator: + <<: *backend_defaults + command: configure.py + environment: + DB_HOST: ${DB_HOST} + DB_PORT: ${DB_PORT} + REDIS_CACHE: ${REDIS_CACHE} + REDIS_QUEUE: ${REDIS_QUEUE} + REDIS_SOCKETIO: ${REDIS_SOCKETIO} + SOCKETIO_PORT: 9000 + depends_on: {} + + backend: + <<: *backend_defaults + volumes: + - sites:/home/frappe/frappe-bench/sites + - assets:/home/frappe/frappe-bench/sites/assets:ro + + frontend: + image: frappe/frappe-nginx:${FRAPPE_VERSION} + environment: + BACKEND: backend:8000 + SOCKETIO: websocket:9000 + 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} + volumes: + - sites:/usr/share/nginx/html/sites + - assets:/usr/share/nginx/html/assets + depends_on: + - backend + - websocket + + websocket: + <<: *depends_on_configurator + image: frappe/frappe-socketio:${FRAPPE_VERSION} + volumes: + - sites:/home/frappe/frappe-bench/sites + + queue-short: + <<: *backend_defaults + command: bench worker --queue short + + queue-default: + <<: *backend_defaults + command: bench worker --queue default + + queue-long: + <<: *backend_defaults + command: bench worker --queue long + + scheduler: + <<: *backend_defaults + command: bench schedule + +# ERPNext requires local assets access (Frappe does not) +volumes: + sites: + assets: diff --git a/apps/erpnext/src/encrypt.sh b/apps/erpnext/src/encrypt.sh old mode 100644 new mode 100755 index 2939685f7..a669725de --- a/apps/erpnext/src/encrypt.sh +++ b/apps/erpnext/src/encrypt.sh @@ -1,12 +1,12 @@ -#!/bin/bash -export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin -clear - - - -# Add encrypt script below if use W9_ENCRYPT_PASSWORD at .env file -# ------------- start ------------------------- - - - -# ------------- end --------------------------- +#!/bin/bash +export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin +clear + + + +# Add encrypt script below if use W9_ENCRYPT_PASSWORD at .env file +# ------------- start ------------------------- + + + +# ------------- end --------------------------- diff --git a/apps/erpnext/src/example.env b/apps/erpnext/src/example.env old mode 100644 new mode 100755 index d12c8b72e..f90e74108 --- a/apps/erpnext/src/example.env +++ b/apps/erpnext/src/example.env @@ -1,40 +1,40 @@ -# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md - -FRAPPE_VERSION=v13.30.0 - -# Only with ERPNext override -ERPNEXT_VERSION=v13.31.1 - -DB_PASSWORD=123 - -# Only if you use external database -DB_HOST= -DB_PORT= - -# Only if you use external Redis -REDIS_CACHE= -REDIS_QUEUE= -REDIS_SOCKETIO= - -# Only with HTTPS override -LETSENCRYPT_EMAIL=mail@example.com - -# These environment variables are not required. - -# Default value is `$$host` which resolves site by host. For example, if your host is `example.com`, -# site's name should be `example.com`, or if host is `127.0.0.1` (local debugging), it should be `127.0.0.1`. -# This variable allows to override described behavior. Let's say you create site named `mysite` -# and do want to access it by `127.0.0.1` host. Than you would set this variable to `mysite`. -FRAPPE_SITE_NAME_HEADER= - -# Default value is `127.0.0.1`. Set IP address as our trusted upstream address. -UPSTREAM_REAL_IP_ADDRESS= - -# Default value is `X-Forwarded-For`. Set request header field whose value will be used to replace the client address -UPSTREAM_REAL_IP_HEADER= - -# Allowed values are on|off. Default value is `off`. If recursive search is disabled, -# the original client address that matches one of the trusted addresses -# is replaced by the last address sent in the request header field defined by the real_ip_header directive. -# If recursive search is enabled, the original client address that matches one of the trusted addresses is replaced by the last non-trusted address sent in the request header field. +# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md + +FRAPPE_VERSION=v13.30.0 + +# Only with ERPNext override +ERPNEXT_VERSION=v13.31.1 + +DB_PASSWORD=123 + +# Only if you use external database +DB_HOST= +DB_PORT= + +# Only if you use external Redis +REDIS_CACHE= +REDIS_QUEUE= +REDIS_SOCKETIO= + +# Only with HTTPS override +LETSENCRYPT_EMAIL=mail@example.com + +# These environment variables are not required. + +# Default value is `$$host` which resolves site by host. For example, if your host is `example.com`, +# site's name should be `example.com`, or if host is `127.0.0.1` (local debugging), it should be `127.0.0.1`. +# This variable allows to override described behavior. Let's say you create site named `mysite` +# and do want to access it by `127.0.0.1` host. Than you would set this variable to `mysite`. +FRAPPE_SITE_NAME_HEADER= + +# Default value is `127.0.0.1`. Set IP address as our trusted upstream address. +UPSTREAM_REAL_IP_ADDRESS= + +# Default value is `X-Forwarded-For`. Set request header field whose value will be used to replace the client address +UPSTREAM_REAL_IP_HEADER= + +# Allowed values are on|off. Default value is `off`. If recursive search is disabled, +# the original client address that matches one of the trusted addresses +# is replaced by the last address sent in the request header field defined by the real_ip_header directive. +# If recursive search is enabled, the original client address that matches one of the trusted addresses is replaced by the last non-trusted address sent in the request header field. UPSTREAM_REAL_IP_RECURSIVE= \ No newline at end of file diff --git a/apps/erpnext/src/filelist b/apps/erpnext/src/filelist old mode 100644 new mode 100755 index fc69f9a8b..60e982b6f --- a/apps/erpnext/src/filelist +++ b/apps/erpnext/src/filelist @@ -1,4 +1,4 @@ -# https://github.com/frappe/frappe_docker -compose.yaml -example.env +# https://github.com/frappe/frappe_docker +compose.yaml +example.env overrides \ No newline at end of file diff --git a/apps/erpnext/src/get_version.sh b/apps/erpnext/src/get_version.sh old mode 100644 new mode 100755 index c3f99f457..a6429db8b --- a/apps/erpnext/src/get_version.sh +++ b/apps/erpnext/src/get_version.sh @@ -1 +1 @@ -sudo echo "erpnext version:" $(docker exec -i erpnext cat /home/frappe/frappe-bench/apps/erpnext/erpnext/__init__.py|grep version |cut -d "=" -f2) 1>> /data/logs/install_version.txt +sudo echo "erpnext version:" $(docker exec -i erpnext cat /home/frappe/frappe-bench/apps/erpnext/erpnext/__init__.py|grep version |cut -d "=" -f2) 1>> /data/logs/install_version.txt diff --git a/apps/erpnext/src/overrides/compose.erpnext.yaml b/apps/erpnext/src/overrides/compose.erpnext.yaml old mode 100644 new mode 100755 index 36f10ad62..a82d35abb --- a/apps/erpnext/src/overrides/compose.erpnext.yaml +++ b/apps/erpnext/src/overrides/compose.erpnext.yaml @@ -1,24 +1,24 @@ -x-erpnext-backend-image: &erpnext_backend_image - image: frappe/erpnext-worker:${ERPNEXT_VERSION:?No ERPNext version set} - -services: - configurator: - <<: *erpnext_backend_image - - backend: - <<: *erpnext_backend_image - - frontend: - image: frappe/erpnext-nginx:${ERPNEXT_VERSION} - - queue-short: - <<: *erpnext_backend_image - - queue-default: - <<: *erpnext_backend_image - - queue-long: - <<: *erpnext_backend_image - - scheduler: - <<: *erpnext_backend_image +x-erpnext-backend-image: &erpnext_backend_image + image: frappe/erpnext-worker:${ERPNEXT_VERSION:?No ERPNext version set} + +services: + configurator: + <<: *erpnext_backend_image + + backend: + <<: *erpnext_backend_image + + frontend: + image: frappe/erpnext-nginx:${ERPNEXT_VERSION} + + queue-short: + <<: *erpnext_backend_image + + queue-default: + <<: *erpnext_backend_image + + queue-long: + <<: *erpnext_backend_image + + scheduler: + <<: *erpnext_backend_image diff --git a/apps/erpnext/src/overrides/compose.mariadb.yaml b/apps/erpnext/src/overrides/compose.mariadb.yaml old mode 100644 new mode 100755 index cd719b621..4592d5f58 --- a/apps/erpnext/src/overrides/compose.mariadb.yaml +++ b/apps/erpnext/src/overrides/compose.mariadb.yaml @@ -1,27 +1,27 @@ -services: - configurator: - environment: - DB_HOST: db - DB_PORT: 3306 - depends_on: - db: - condition: service_healthy - - db: - image: mariadb:10.6 - healthcheck: - test: mysqladmin ping -h localhost --password=${DB_PASSWORD} - interval: 1s - retries: 15 - command: - - --character-set-server=utf8mb4 - - --collation-server=utf8mb4_unicode_ci - - --skip-character-set-client-handshake - - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6 - environment: - MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?No db password set} - volumes: - - db-data:/var/lib/mysql - -volumes: - db-data: +services: + configurator: + environment: + DB_HOST: db + DB_PORT: 3306 + depends_on: + db: + condition: service_healthy + + db: + image: mariadb:10.6 + healthcheck: + test: mysqladmin ping -h localhost --password=${DB_PASSWORD} + interval: 1s + retries: 15 + command: + - --character-set-server=utf8mb4 + - --collation-server=utf8mb4_unicode_ci + - --skip-character-set-client-handshake + - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6 + environment: + MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?No db password set} + volumes: + - db-data:/var/lib/mysql + +volumes: + db-data: diff --git a/apps/erpnext/src/overrides/compose.noproxy.yaml b/apps/erpnext/src/overrides/compose.noproxy.yaml old mode 100644 new mode 100755 index 5c4f83c0e..599005eb5 --- a/apps/erpnext/src/overrides/compose.noproxy.yaml +++ b/apps/erpnext/src/overrides/compose.noproxy.yaml @@ -1,4 +1,4 @@ -services: - frontend: - ports: - - 8080:8080 +services: + frontend: + ports: + - 8080:8080 diff --git a/apps/erpnext/src/overrides/compose.redis.yaml b/apps/erpnext/src/overrides/compose.redis.yaml old mode 100644 new mode 100755 index 5bd3a0aa8..43a5ff828 --- a/apps/erpnext/src/overrides/compose.redis.yaml +++ b/apps/erpnext/src/overrides/compose.redis.yaml @@ -1,16 +1,16 @@ -services: - configurator: - environment: - REDIS_CACHE: redis:6379/0 - REDIS_QUEUE: redis:6379/1 - REDIS_SOCKETIO: redis:6379/2 - depends_on: - - redis - - redis: - image: redis:6.2-alpine - volumes: - - redis-data:/data - -volumes: - redis-data: +services: + configurator: + environment: + REDIS_CACHE: redis:6379/0 + REDIS_QUEUE: redis:6379/1 + REDIS_SOCKETIO: redis:6379/2 + depends_on: + - redis + + redis: + image: redis:6.2-alpine + volumes: + - redis-data:/data + +volumes: + redis-data: diff --git a/apps/erpnext/variables.json b/apps/erpnext/variables.json index 34f70353b..1c45dab89 100644 --- a/apps/erpnext/variables.json +++ b/apps/erpnext/variables.json @@ -8,9 +8,9 @@ { "dist": "community", "version": [ + "v16", "v15", - "v14", - "v13" + "v14" ] } ], @@ -20,4 +20,4 @@ "disk": "1", "url": "https://github.com/frappe/bench" } -} +} \ No newline at end of file diff --git a/apps/kafka/.env b/apps/kafka/.env index 61221429b..b6ed79d3e 100644 --- a/apps/kafka/.env +++ b/apps/kafka/.env @@ -1,18 +1,30 @@ -W9_DIST='community' -W9_REPO=bitnamilegacy/kafka -W9_VERSION='4.0' -W9_POWER_PASSWORD='5xd!n4MoJl8OBI2f' +W9_REPO=apache/kafka +W9_DIST=community +W9_VERSION=4.0.1 +W9_POWER_PASSWORD=5xd!n4MoJl8OBI2f +W9_DB_KAFKA_PORT_SET=9092 + #### -- Not allowed to edit below environments when recreate app based on existing data -- #### -W9_ID='kafka' -W9_DB_KAFKA_PORT_SET='9092' +W9_ID=kafka W9_DB_KAFKA_PORT=9092 +W9_URL=internet_ip +W9_URL_REPLACE=true W9_NETWORK=websoft9 #### --------------------------------------------------------------------------------------- #### -# kafka env: https://github.com/bitnami/containers/blob/main/bitnami/kafka/README.md -KAFKA_CFG_NODE_ID=0 -KAFKA_CFG_PROCESS_ROLES=controller,broker -KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 -KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT -KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093 -KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER +# kafka env: https://github.com/apache/kafka/tree/trunk/docker/examples +CLUSTER_ID=4L6g3nShT-eMCtK--X86sw +KAFKA_NODE_ID=1 +KAFKA_PROCESS_ROLES=broker,controller +KAFKA_LISTENERS=CONTROLLER://:29093,PLAINTEXT_HOST://:9092,PLAINTEXT://:19092 +KAFKA_ADVERTISED_LISTENERS=PLAINTEXT_HOST://${W9_URL}:9092,PLAINTEXT://kafka:19092 +KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT +KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka:29093 +KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER +KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT +KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 +KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 +KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1 +KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 +KAFKA_SHARE_COORDINATOR_STATE_TOPIC_REPLICATION_FACTOR=1 +KAFKA_SHARE_COORDINATOR_STATE_TOPIC_MIN_ISR=1 diff --git a/apps/kafka/CHANGELOG.md b/apps/kafka/CHANGELOG.md index a0cf709bc..5c58bfc47 100644 --- a/apps/kafka/CHANGELOG.md +++ b/apps/kafka/CHANGELOG.md @@ -1 +1,5 @@ # CHANGELOG + +## 4.0.1 +- Migrated from `bitnamilegacy/kafka` to official `apache/kafka` image +- Updated supported versions: `4.0.1`, `3.9.2`, `3.8.1`, `3.7.2` diff --git a/apps/kafka/README.md b/apps/kafka/README.md index 3140d83f3..81a2f02ee 100644 --- a/apps/kafka/README.md +++ b/apps/kafka/README.md @@ -3,7 +3,7 @@ This is an **[Docker Compose template](https://github.com/Websoft9/docker-library)** powered by [Websoft9](https://www.websoft9.com) based on Docker for Kafka: - - community: 4.0, 3.9, 3.8, 3.6, 3.2, 2.8, latest + - community: 4.0.1, 3.9.2, 3.8.1, 3.7.2 ## System Requirements diff --git a/apps/kafka/docker-compose.yml b/apps/kafka/docker-compose.yml index bc3207d78..232d08381 100644 --- a/apps/kafka/docker-compose.yml +++ b/apps/kafka/docker-compose.yml @@ -1,18 +1,32 @@ -# kafka image: https://hub.docker.com/r/bitnamilegacy/kafka - -version: "3.8" +# kafka image: https://hub.docker.com/r/apache/kafka services: kafka: image: $W9_REPO:$W9_VERSION container_name: $W9_ID + hostname: $W9_ID restart: unless-stopped ports: - - "$W9_DB_PORT_SET:9092" - env_file: - - .env + - "$W9_DB_KAFKA_PORT_SET:9092" + environment: + CLUSTER_ID: ${CLUSTER_ID} + KAFKA_NODE_ID: ${KAFKA_NODE_ID} + KAFKA_PROCESS_ROLES: ${KAFKA_PROCESS_ROLES} + KAFKA_LISTENERS: ${KAFKA_LISTENERS} + KAFKA_ADVERTISED_LISTENERS: ${KAFKA_ADVERTISED_LISTENERS} + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: ${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} + KAFKA_CONTROLLER_QUORUM_VOTERS: ${KAFKA_CONTROLLER_QUORUM_VOTERS} + KAFKA_CONTROLLER_LISTENER_NAMES: ${KAFKA_CONTROLLER_LISTENER_NAMES} + KAFKA_INTER_BROKER_LISTENER_NAME: ${KAFKA_INTER_BROKER_LISTENER_NAME} + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: ${KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR} + KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: ${KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS} + KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: ${KAFKA_TRANSACTION_STATE_LOG_MIN_ISR} + KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: ${KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR} + KAFKA_SHARE_COORDINATOR_STATE_TOPIC_REPLICATION_FACTOR: ${KAFKA_SHARE_COORDINATOR_STATE_TOPIC_REPLICATION_FACTOR} + KAFKA_SHARE_COORDINATOR_STATE_TOPIC_MIN_ISR: ${KAFKA_SHARE_COORDINATOR_STATE_TOPIC_MIN_ISR} + KAFKA_LOG_DIRS: /var/lib/kafka/data volumes: - - "kafka_data:/bitnami" + - kafka_data:/var/lib/kafka/data volumes: kafka_data: diff --git a/apps/kafka/variables.json b/apps/kafka/variables.json index 96a52805a..6d80945b4 100644 --- a/apps/kafka/variables.json +++ b/apps/kafka/variables.json @@ -2,12 +2,17 @@ "name": "kafka", "trademark": "Kafka", "release": true, - "fork_url": "https://github.com/bitnami/bitnami-docker-kafka", - "version_from": "https://hub.docker.com/r/bitnami/kafka/tags", + "fork_url": "https://github.com/apache/kafka", + "version_from": "https://hub.docker.com/r/apache/kafka/tags", "edition": [ { "dist": "community", - "version": ["4.0","3.9","3.8","3.6","3.2","2.8","latest"] + "version": [ + "4.0.1", + "3.9.2", + "3.8.1", + "3.7.2" + ] } ], "requirements": { @@ -16,4 +21,4 @@ "disk": "1", "url": "http://kafka.apache.org/quickstart" } -} +} \ No newline at end of file