Modification for version15 and custom apps

This commit is contained in:
Bryantant 2026-03-06 13:00:23 +07:00
parent a6fba64246
commit 0e3597e7e7
4 changed files with 314 additions and 1 deletions

5
apps.json Normal file
View file

@ -0,0 +1,5 @@
[
{ "url":"https://github.com/frappe/erpnext", "branch":"version-15" },
{ "url":"https://github.com/frappe/print_designer.git", "branch":"main" },
{ "url":"https://github.com/Bryantant/Hicom-POS.git", "branch":"whitelabel-hicom-pos" }
]

237
compose.custom.yaml Normal file
View file

@ -0,0 +1,237 @@
name: hicom_offline
services:
backend:
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: hicom:15-pd-pos
networks:
default: null
platform: linux/amd64
pull_policy: never
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
configurator:
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; bench set-config -g chromium_path /usr/bin/chromium-headless-shell;
depends_on:
db:
condition: service_healthy
required: true
redis-cache:
condition: service_started
required: true
redis-queue:
condition: service_started
required: true
entrypoint:
- bash
- -c
environment:
DB_HOST: db
DB_PORT: "3306"
REDIS_CACHE: redis-cache:6379
REDIS_QUEUE: redis-queue:6379
SOCKETIO_PORT: "9000"
image: hicom:15-pd-pos
networks:
default: null
platform: linux/amd64
pull_policy: never
restart: on-failure
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
db:
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
- --skip-innodb-read-only-compressed
environment:
MARIADB_AUTO_UPGRADE: "1"
MYSQL_ROOT_PASSWORD: KAAdmHC!234
healthcheck:
test:
- CMD
- healthcheck.sh
- --connect
- --innodb_initialized
timeout: 5s
interval: 5s
retries: 5
start_period: 5s
image: mariadb:11.8
networks:
default: null
restart: unless-stopped
volumes:
- type: volume
source: db-data
target: /var/lib/mysql
volume: {}
frontend:
command:
- nginx-entrypoint.sh
depends_on:
backend:
condition: service_started
required: true
websocket:
condition: service_started
required: true
environment:
BACKEND: backend:8000
CLIENT_MAX_BODY_SIZE: 100m
FRAPPE_SITE_NAME_HEADER: $$host
PROXY_READ_TIMEOUT: 120s
SOCKETIO: websocket:9000
UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
UPSTREAM_REAL_IP_RECURSIVE: "on"
image: hicom:15-pd-pos
networks:
default: null
platform: linux/amd64
ports:
- mode: ingress
target: 8080
published: "8080"
protocol: tcp
pull_policy: never
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
queue-long:
command:
- bench
- worker
- --queue
- long,default,short
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: hicom:15-pd-pos
networks:
default: null
platform: linux/amd64
pull_policy: never
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
queue-short:
command:
- bench
- worker
- --queue
- short,default
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: hicom:15-pd-pos
networks:
default: null
platform: linux/amd64
pull_policy: never
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
redis-cache:
image: redis:6.2-alpine
networks:
default: null
restart: unless-stopped
redis-queue:
image: redis:6.2-alpine
networks:
default: null
restart: unless-stopped
volumes:
- type: volume
source: redis-queue-data
target: /data
volume: {}
scheduler:
command:
- bench
- schedule
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: hicom:15-pd-pos
networks:
default: null
platform: linux/amd64
pull_policy: never
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
websocket:
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: hicom:15-pd-pos
networks:
default: null
platform: linux/amd64
pull_policy: never
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
networks:
default:
name: hicom_offline_default
volumes:
db-data:
name: hicom_offline_db-data
redis-queue-data:
name: hicom_offline_redis-queue-data
sites:
name: hicom_offline_sites
x-backend-defaults:
depends_on:
configurator:
condition: service_completed_successfully
image: hicom:15-pd-pos
pull_policy: never
restart: unless-stopped
volumes:
- sites:/home/frappe/frappe-bench/sites
x-customizable-image:
image: hicom:15-pd-pos
pull_policy: never
restart: unless-stopped
x-depends-on-configurator:
depends_on:
configurator:
condition: service_completed_successfully

71
custom.env Normal file
View file

@ -0,0 +1,71 @@
FRAPPE_PATH=https://github.com/frappe/frappe
FRAPPE_BRANCH=version-15
# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/environment-variables.md
ERPNEXT_VERSION=v15.99.0
DB_PASSWORD=KAAdmHC!234
#Only if you use docker secrets for the db password
DB_PASSWORD_SECRETS_FILE=
# Only if you use external database
DB_HOST=
DB_PORT=
# Only if you use external Redis
REDIS_CACHE=
REDIS_QUEUE=
# 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 `8080`.
HTTP_PUBLISH_PORT=8080
# Default value is `443`.
HTTPS_PUBLISH_PORT=
# Default value is `127.0.0.1`. Set IP address as our trusted upstream address.
UPSTREAM_REAL_IP_ADDRESS=127.0.0.1
# Default value is `X-Forwarded-For`. Set request header field whose value will be used to replace the client address
UPSTREAM_REAL_IP_HEADER=X-Forwarded-For
# 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=on
# All Values Allowed by nginx proxy_read_timeout are allowed, default value is 120s
# Useful if you have longrunning print formats or slow loading sites
PROXY_READ_TIMEOUT=120s
# All Values allowed by nginx client_max_body_size are allowed, default value is 50m
# Necessary if the upload limit in the frappe application is increased
CLIENT_MAX_BODY_SIZE=100m
# Only with traefik overrides
# Single site: SITES_RULE=Host(`erp.example.com`)
# Multiple sites: SITES_RULE=Host(`a.example.com`) || Host(`b.example.com`)
# More https://doc.traefik.io/traefik/routing/routers/#rule
# About acme https://doc.traefik.io/traefik/https/acme/#domain-definition
SITES_RULE=Host(`erp.example.com`)
# Only with nginxproxy overrides
# Single site: NGINX_PROXY_HOSTS=erp.example.com
# Multiple sites: NGINX_PROXY_HOSTS=erp.example.com,www.erp.example.com
NGINX_PROXY_HOSTS=erp.example.com
CUSTOM_IMAGE=hicom
CUSTOM_TAG=15-pd-pos
PULL_POLICY=never

View file

@ -8,7 +8,7 @@ services:
condition: service_healthy
db:
image: mariadb:11.8
image: mariadb:10.6
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 5s