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.
|
# Domain: assign in Coolify UI → service `frontend` → port 8080.
|
||||||
# SITE_NAME + FRAPPE_SITE_NAME_HEADER use SERVICE_FQDN_FRONTEND automatically.
|
# SITE_NAME + FRAPPE_SITE_NAME_HEADER use SERVICE_FQDN_FRONTEND automatically.
|
||||||
# Image: set CUSTOM_IMAGE / CUSTOM_TAG from Jenkins (dist/coolify-image.env).
|
# 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
|
x-customizable-image: &customizable_image
|
||||||
image: ${CUSTOM_IMAGE:-git.aexoradao.com/epistemophiliac/erpnext}:${CUSTOM_TAG:-main}
|
image: ${CUSTOM_IMAGE:-git.aexoradao.com/epistemophiliac/erpnext}:${CUSTOM_TAG:-main}
|
||||||
pull_policy: ${PULL_POLICY:-never}
|
pull_policy: ${PULL_POLICY:-never}
|
||||||
restart: ${RESTART_POLICY:-unless-stopped}
|
restart: ${RESTART_POLICY:-unless-stopped}
|
||||||
|
|
||||||
x-depends-on-image-preload: &depends_on_image_preload
|
x-frappe-platform: &frappe_platform
|
||||||
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]
|
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
|
|
||||||
|
x-sites-volume: &sites_volume
|
||||||
volumes:
|
volumes:
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
- sites:/home/frappe/frappe-bench/sites
|
||||||
|
|
||||||
|
|
@ -91,7 +82,7 @@ services:
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
configurator:
|
configurator:
|
||||||
<<: *backend_defaults
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
exclude_from_hc: true
|
exclude_from_hc: true
|
||||||
restart: 'no'
|
restart: 'no'
|
||||||
entrypoint: ['bash', '-c']
|
entrypoint: ['bash', '-c']
|
||||||
|
|
@ -112,6 +103,8 @@ services:
|
||||||
- 'REDIS_QUEUE=redis-queue:6379'
|
- 'REDIS_QUEUE=redis-queue:6379'
|
||||||
- 'SOCKETIO_PORT=9000'
|
- 'SOCKETIO_PORT=9000'
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis-cache:
|
redis-cache:
|
||||||
|
|
@ -120,10 +113,9 @@ services:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
create-site:
|
create-site:
|
||||||
<<: [*depends_on_image_preload, *customizable_image]
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
exclude_from_hc: true
|
exclude_from_hc: true
|
||||||
restart: 'no'
|
restart: 'no'
|
||||||
platform: linux/amd64
|
|
||||||
entrypoint: ['bash', '-c']
|
entrypoint: ['bash', '-c']
|
||||||
command:
|
command:
|
||||||
- >
|
- >
|
||||||
|
|
@ -139,16 +131,16 @@ services:
|
||||||
- 'ADMIN_PASSWORD=${ADMIN_PASSWORD:-changeme}'
|
- 'ADMIN_PASSWORD=${ADMIN_PASSWORD:-changeme}'
|
||||||
- 'DB_PASSWORD=${DB_PASSWORD:-changeme}'
|
- 'DB_PASSWORD=${DB_PASSWORD:-changeme}'
|
||||||
- 'INSTALL_APPS=${INSTALL_APPS:-erpnext,payments,hrms,lending,lms}'
|
- 'INSTALL_APPS=${INSTALL_APPS:-erpnext,payments,hrms,lending,lms}'
|
||||||
volumes:
|
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
configurator:
|
configurator:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
migrator:
|
migrator:
|
||||||
<<: *backend_defaults
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
exclude_from_hc: true
|
exclude_from_hc: true
|
||||||
restart: 'no'
|
restart: 'no'
|
||||||
entrypoint: ['bash', '-c']
|
entrypoint: ['bash', '-c']
|
||||||
|
|
@ -161,16 +153,22 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- 'MIGRATE_SITES=${MIGRATE_SITES:-true}'
|
- 'MIGRATE_SITES=${MIGRATE_SITES:-true}'
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
create-site:
|
create-site:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
<<: *backend_defaults
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
environment:
|
environment:
|
||||||
- 'GUNICORN_THREADS=${GUNICORN_THREADS:-4}'
|
- 'GUNICORN_THREADS=${GUNICORN_THREADS:-4}'
|
||||||
- 'GUNICORN_WORKERS=${GUNICORN_WORKERS:-2}'
|
- 'GUNICORN_WORKERS=${GUNICORN_WORKERS:-2}'
|
||||||
- 'GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT:-120}'
|
- 'GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT:-120}'
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
configurator:
|
configurator:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
create-site:
|
create-site:
|
||||||
|
|
@ -185,20 +183,20 @@ services:
|
||||||
start_period: 120s
|
start_period: 120s
|
||||||
|
|
||||||
websocket:
|
websocket:
|
||||||
<<: [*depends_on_image_preload, *depends_on_configurator, *customizable_image]
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
platform: linux/amd64
|
|
||||||
command:
|
command:
|
||||||
- node
|
- node
|
||||||
- /home/frappe/frappe-bench/apps/frappe/socketio.js
|
- /home/frappe/frappe-bench/apps/frappe/socketio.js
|
||||||
volumes:
|
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
create-site:
|
create-site:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
<<: [*depends_on_image_preload, *customizable_image]
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
platform: linux/amd64
|
|
||||||
command:
|
command:
|
||||||
- nginx-entrypoint.sh
|
- nginx-entrypoint.sh
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -212,9 +210,9 @@ services:
|
||||||
- 'UPSTREAM_REAL_IP_RECURSIVE=${UPSTREAM_REAL_IP_RECURSIVE:-off}'
|
- 'UPSTREAM_REAL_IP_RECURSIVE=${UPSTREAM_REAL_IP_RECURSIVE:-off}'
|
||||||
- 'PROXY_READ_TIMEOUT=${PROXY_READ_TIMEOUT:-120}'
|
- 'PROXY_READ_TIMEOUT=${PROXY_READ_TIMEOUT:-120}'
|
||||||
- 'CLIENT_MAX_BODY_SIZE=${CLIENT_MAX_BODY_SIZE:-50m}'
|
- 'CLIENT_MAX_BODY_SIZE=${CLIENT_MAX_BODY_SIZE:-50m}'
|
||||||
volumes:
|
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
backend:
|
backend:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
websocket:
|
websocket:
|
||||||
|
|
@ -227,37 +225,49 @@ services:
|
||||||
start_period: 90s
|
start_period: 90s
|
||||||
|
|
||||||
queue-short:
|
queue-short:
|
||||||
<<: *backend_defaults
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
command:
|
command:
|
||||||
- bench
|
- bench
|
||||||
- worker
|
- worker
|
||||||
- --queue
|
- --queue
|
||||||
- short,default
|
- short,default
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
create-site:
|
create-site:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
migrator:
|
migrator:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
||||||
queue-long:
|
queue-long:
|
||||||
<<: *backend_defaults
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
command:
|
command:
|
||||||
- bench
|
- bench
|
||||||
- worker
|
- worker
|
||||||
- --queue
|
- --queue
|
||||||
- long,default,short
|
- long,default,short
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
create-site:
|
create-site:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
migrator:
|
migrator:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
<<: *backend_defaults
|
<<: [*customizable_image, *frappe_platform, *sites_volume]
|
||||||
command:
|
command:
|
||||||
- bench
|
- bench
|
||||||
- schedule
|
- schedule
|
||||||
depends_on:
|
depends_on:
|
||||||
|
image-preload:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
configurator:
|
||||||
|
condition: service_completed_successfully
|
||||||
create-site:
|
create-site:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
migrator:
|
migrator:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue