Fix image-preload ordering so ERPNext waits for internal copy.
YAML merge was dropping depends_on; configurator started before skopeo loaded the image.
This commit is contained in:
parent
4126cbf737
commit
260aa8c7da
1 changed files with 41 additions and 31 deletions
|
|
@ -2,26 +2,17 @@
|
|||
# Domain: assign in Coolify UI → service `frontend` → port 8080.
|
||||
# SITE_NAME + FRAPPE_SITE_NAME_HEADER use SERVICE_FQDN_FRONTEND automatically.
|
||||
# Image: set CUSTOM_IMAGE / CUSTOM_TAG from Jenkins (dist/coolify-image.env).
|
||||
# No ports: — routing uses SERVICE_URL_FRONTEND_8080.
|
||||
# image-preload copies from internal Forgejo before any ERPNext container starts.
|
||||
|
||||
x-customizable-image: &customizable_image
|
||||
image: ${CUSTOM_IMAGE:-git.aexoradao.com/epistemophiliac/erpnext}:${CUSTOM_TAG:-main}
|
||||
pull_policy: ${PULL_POLICY:-never}
|
||||
restart: ${RESTART_POLICY:-unless-stopped}
|
||||
|
||||
x-depends-on-image-preload: &depends_on_image_preload
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
|
||||
x-depends-on-configurator: &depends_on_configurator
|
||||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
|
||||
x-backend-defaults: &backend_defaults
|
||||
<<: [*depends_on_image_preload, *depends_on_configurator, *customizable_image]
|
||||
x-frappe-platform: &frappe_platform
|
||||
platform: linux/amd64
|
||||
|
||||
x-sites-volume: &sites_volume
|
||||
volumes:
|
||||
- sites:/home/frappe/frappe-bench/sites
|
||||
|
||||
|
|
@ -91,7 +82,7 @@ services:
|
|||
retries: 5
|
||||
|
||||
configurator:
|
||||
<<: *backend_defaults
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
exclude_from_hc: true
|
||||
restart: 'no'
|
||||
entrypoint: ['bash', '-c']
|
||||
|
|
@ -112,6 +103,8 @@ services:
|
|||
- 'REDIS_QUEUE=redis-queue:6379'
|
||||
- 'SOCKETIO_PORT=9000'
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis-cache:
|
||||
|
|
@ -120,10 +113,9 @@ services:
|
|||
condition: service_healthy
|
||||
|
||||
create-site:
|
||||
<<: [*depends_on_image_preload, *customizable_image]
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
exclude_from_hc: true
|
||||
restart: 'no'
|
||||
platform: linux/amd64
|
||||
entrypoint: ['bash', '-c']
|
||||
command:
|
||||
- >
|
||||
|
|
@ -139,16 +131,16 @@ services:
|
|||
- 'ADMIN_PASSWORD=${ADMIN_PASSWORD:-changeme}'
|
||||
- 'DB_PASSWORD=${DB_PASSWORD:-changeme}'
|
||||
- 'INSTALL_APPS=${INSTALL_APPS:-erpnext,payments,hrms,lending,lms}'
|
||||
volumes:
|
||||
- sites:/home/frappe/frappe-bench/sites
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
migrator:
|
||||
<<: *backend_defaults
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
exclude_from_hc: true
|
||||
restart: 'no'
|
||||
entrypoint: ['bash', '-c']
|
||||
|
|
@ -161,16 +153,22 @@ services:
|
|||
environment:
|
||||
- 'MIGRATE_SITES=${MIGRATE_SITES:-true}'
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
create-site:
|
||||
condition: service_completed_successfully
|
||||
|
||||
backend:
|
||||
<<: *backend_defaults
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
environment:
|
||||
- 'GUNICORN_THREADS=${GUNICORN_THREADS:-4}'
|
||||
- 'GUNICORN_WORKERS=${GUNICORN_WORKERS:-2}'
|
||||
- 'GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT:-120}'
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
create-site:
|
||||
|
|
@ -185,20 +183,20 @@ services:
|
|||
start_period: 120s
|
||||
|
||||
websocket:
|
||||
<<: [*depends_on_image_preload, *depends_on_configurator, *customizable_image]
|
||||
platform: linux/amd64
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
command:
|
||||
- node
|
||||
- /home/frappe/frappe-bench/apps/frappe/socketio.js
|
||||
volumes:
|
||||
- sites:/home/frappe/frappe-bench/sites
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
create-site:
|
||||
condition: service_completed_successfully
|
||||
|
||||
frontend:
|
||||
<<: [*depends_on_image_preload, *customizable_image]
|
||||
platform: linux/amd64
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
command:
|
||||
- nginx-entrypoint.sh
|
||||
environment:
|
||||
|
|
@ -212,9 +210,9 @@ services:
|
|||
- '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}'
|
||||
volumes:
|
||||
- sites:/home/frappe/frappe-bench/sites
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
backend:
|
||||
condition: service_healthy
|
||||
websocket:
|
||||
|
|
@ -227,37 +225,49 @@ services:
|
|||
start_period: 90s
|
||||
|
||||
queue-short:
|
||||
<<: *backend_defaults
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
command:
|
||||
- bench
|
||||
- worker
|
||||
- --queue
|
||||
- short,default
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
create-site:
|
||||
condition: service_completed_successfully
|
||||
migrator:
|
||||
condition: service_completed_successfully
|
||||
|
||||
queue-long:
|
||||
<<: *backend_defaults
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
command:
|
||||
- bench
|
||||
- worker
|
||||
- --queue
|
||||
- long,default,short
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
create-site:
|
||||
condition: service_completed_successfully
|
||||
migrator:
|
||||
condition: service_completed_successfully
|
||||
|
||||
scheduler:
|
||||
<<: *backend_defaults
|
||||
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||
command:
|
||||
- bench
|
||||
- schedule
|
||||
depends_on:
|
||||
image-preload:
|
||||
condition: service_completed_successfully
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
create-site:
|
||||
condition: service_completed_successfully
|
||||
migrator:
|
||||
|
|
|
|||
Loading…
Reference in a new issue