Drop depends_on's required: sub-key for Dokploy too
Confirmed on a real deploy: services.configurator.depends_on.db Additional property required is not allowed. Same pattern as the previous two Dokploy validator rejections (include:, long-form env_file) -- its schema doesn't know about depends_on's newer required: sub-key, only the long-established condition:. Dropping required: is safe: the omitted default is already required: true (a hard dependency), which is what every entry here actually uses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y
This commit is contained in:
parent
8b50774ce3
commit
6e4b1302fa
|
|
@ -14,7 +14,6 @@ services:
|
|||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
required: true
|
||||
environment:
|
||||
GUNICORN_THREADS: ${GUNICORN_THREADS:-4}
|
||||
GUNICORN_TIMEOUT: ${GUNICORN_TIMEOUT:-120}
|
||||
|
|
@ -37,7 +36,6 @@ services:
|
|||
depends_on:
|
||||
backend:
|
||||
condition: service_started
|
||||
required: true
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
networks:
|
||||
|
|
@ -63,13 +61,10 @@ services:
|
|||
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
|
||||
|
|
@ -123,10 +118,8 @@ services:
|
|||
depends_on:
|
||||
backend:
|
||||
condition: service_started
|
||||
required: true
|
||||
websocket:
|
||||
condition: service_started
|
||||
required: true
|
||||
environment:
|
||||
BACKEND: backend:8000
|
||||
CLIENT_MAX_BODY_SIZE: ${CLIENT_MAX_BODY_SIZE:-50m}
|
||||
|
|
@ -168,7 +161,6 @@ services:
|
|||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
required: true
|
||||
image: ${CUSTOM_IMAGE:-frappe/erpnext}:${CUSTOM_TAG:-$ERPNEXT_VERSION}
|
||||
networks:
|
||||
default: null
|
||||
|
|
@ -185,7 +177,6 @@ services:
|
|||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
required: true
|
||||
image: ${CUSTOM_IMAGE:-frappe/erpnext}:${CUSTOM_TAG:-$ERPNEXT_VERSION}
|
||||
networks:
|
||||
default: null
|
||||
|
|
@ -217,7 +208,6 @@ services:
|
|||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
required: true
|
||||
image: ${CUSTOM_IMAGE:-frappe/erpnext}:${CUSTOM_TAG:-$ERPNEXT_VERSION}
|
||||
networks:
|
||||
default: null
|
||||
|
|
@ -236,7 +226,6 @@ services:
|
|||
depends_on:
|
||||
configurator:
|
||||
condition: service_completed_successfully
|
||||
required: true
|
||||
image: ${CUSTOM_IMAGE:-frappe/erpnext}:${CUSTOM_TAG:-$ERPNEXT_VERSION}
|
||||
networks:
|
||||
default: null
|
||||
|
|
|
|||
|
|
@ -38,10 +38,18 @@
|
|||
# either). The Python filter below collapses that structure back to the
|
||||
# plain string form, for every service, not just backend-billing — safe to
|
||||
# do broadly, since the short form already implies "must exist", the exact
|
||||
# behavior `required: true` spells out. Left alone: `depends_on`'s own,
|
||||
# unrelated `required:` field (a different Compose feature entirely, and
|
||||
# not something Dokploy's validator objects to), which this filter's regex
|
||||
# only matches directly beneath a `- path:` line, not there.
|
||||
# behavior `required: true` spells out.
|
||||
#
|
||||
# A third, separate Dokploy validator rejection, also confirmed on a real
|
||||
# deploy: `services.configurator.depends_on.db Additional property required
|
||||
# is not allowed`. Compose's long-form `depends_on` has long supported
|
||||
# `condition:` (service_started/healthy/completed_successfully) — that part
|
||||
# is fine. `required:` alongside it (marking a dependency as optional) is
|
||||
# the newer addition Dokploy's schema doesn't know about, same pattern as
|
||||
# the other two rejections above. The second filter below drops just the
|
||||
# `required:` line, keeping `condition:` — dropping it is safe because the
|
||||
# default when omitted is already `required: true` (a hard dependency),
|
||||
# which is what every `depends_on` entry in this file actually uses.
|
||||
#
|
||||
# Usage: ./generate-dokploy-compose.sh
|
||||
# Run this any time docker-compose.yml changes, or any time frappe_docker
|
||||
|
|
@ -67,8 +75,10 @@ OUT="docker-compose.dokploy.yml"
|
|||
| python3 -c "
|
||||
import sys, re
|
||||
text = sys.stdin.read()
|
||||
pattern = re.compile(r'^(\s*)- path: (.+)\n\s*required: (?:true|false)\s*\$', re.MULTILINE)
|
||||
text = pattern.sub(lambda m: f'{m.group(1)}- {m.group(2)}', text)
|
||||
# env_file long form -> plain string (Dokploy rejection #2).
|
||||
text = re.sub(r'^(\s*)- path: (.+)\n\s*required: (?:true|false)\s*\$', lambda m: f'{m.group(1)}- {m.group(2)}', text, flags=re.MULTILINE)
|
||||
# depends_on: drop required:, keep condition: (Dokploy rejection #3).
|
||||
text = re.sub(r'^(\s*condition: .+)\n\s*required: (?:true|false)\s*\$', r'\1', text, flags=re.MULTILINE)
|
||||
sys.stdout.write(text)
|
||||
"
|
||||
} > "$OUT"
|
||||
|
|
|
|||
Loading…
Reference in New Issue