The 1677-line generated docker-compose.yaml was ~440 lines of YAML-anchor
boilerplate (`x-shared-env: &shared-api-worker-env` populated by
`generate_docker_compose` from `.env.example`). Native compose has had
`env_file:` for years and supports interpolation in env files since 2.24,
so the anchor + generator pair was reimplementing what compose does itself.
This commit:
- Removes the `x-shared-env: &shared-api-worker-env` anchor and all
`<<: *shared-api-worker-env` merges. Services that need the shared
config (`api`, `worker`, `worker_beat`, `plugin_daemon`) now use
env_file:
- .env.example
- .env
- Deletes `docker/docker-compose-template.yaml` (no longer needed; the
generated compose file becomes the single source of truth).
- Deletes `docker/generate_docker_compose` (no template, no generation).
`docker/docker-compose.yaml` now contains the full, hand-readable compose
config in 958 lines (was 1677 — a 43% reduction). The default
`docker compose up -d` brings up exactly the same set of services
(api/web/worker/redis/postgres/weaviate/...) via the existing
profile-gating in COMPOSE_PROFILES.
Suggestion from #35925.
Behavior note: shared-config keys are no longer interpolated through
compose, so passing `KEY=value docker compose up -d` from the shell
no longer overrides container env for those keys — set them in
`docker/.env` instead. Service-specific overrides via the
`environment:` block continue to work as before.
#35708 added 660+ lines of bash + PowerShell to wrap docker compose
and merge a new .env.default with the user's .env. Native Compose
already provides everything that script does:
- `${VAR:-default}` interpolation in compose.yaml gives per-key
defaults without a separate .env.default file.
- Auto-loaded .env in the project dir interpolates ${VAR:-default}
on the value side, so COMPOSE_PROFILES=${VECTOR_STORE:-weaviate},
${DB_TYPE:-postgresql} expands correctly without a wrapper.
- `profiles:` on services already gates DB / vector-store selection.
- Maintaining two scripts (bash + PowerShell) duplicates env-file
parsing logic that compose owns natively, with subtle differences
(e.g. PowerShell's Get-Content uses system encoding, the bash
script's awk parser doesn't handle inline `# comment` after a
value).
Drop the wrappers and `.env.default`. Restore the README to the
two-step `cp .env.example .env && docker compose up -d` flow.
The .env.example placeholder cleanups landed in #35708 are kept.
Net: -712 lines, same UX modulo one extra `cp` step.
The frontend and backend implementation for the human input node.
Co-authored-by: twwu <twwu@dify.ai>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: zhsama <torvalds@linux.do>
The backend part of the human in the loop (HITL) feature and relevant architecture / workflow engine changes.
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: 盐粒 Yanli <yanli@dify.ai>
Co-authored-by: CrabSAMA <40541269+CrabSAMA@users.noreply.github.com>
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: yihong <zouzou0208@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>