[PR #5553] fix: remove obsoleted 'version' elements in compose files #24973

Closed
opened 2026-02-21 20:24:02 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/5553

State: closed
Merged: Yes


Description

This PR removes the line version: '3' from all docker-compose*.yaml files.

The version element is already obsoleted, and causes warning to be shown in the newer compose plugin:

The top-level version property is defined by the Compose Specification for backward compatibility. It is only informative and you'll receive a warning message that it is obsolete if used.
https://docs.docker.com/compose/compose-file/04-version-and-name/

Example warnings are here; the same warning will be shown on any other docker compose commands:

$ docker compose up -d
WARN[0000] /home/********/dify/docker/docker-compose.yaml: `version` is obsolete      👈👈👈👈👈
[+] Running 12/12
 ✔ Network docker_ssrf_proxy_network  Created                                                                                                                                                                   0.1s 
 ✔ Network docker_default             Created                                                                                                                                                                   0.1s 
 ✔ Container docker-sandbox-1         Started                                                                                                                                                                   0.5s 
 ✔ Container docker-weaviate-1        Started                                                                                                                                                                   0.8s 
 ✔ Container docker-web-1             Started                                                                                                                                                                   0.6s 
 ✔ Container docker-db-1              Started                                                                                                                                                                   0.7s 
 ✔ Container docker-ssrf_proxy-1      Started                                                                                                                                                                   0.9s 
 ✔ Container docker-redis-1           Started                                                                                                                                                                   0.6s 
 ✔ Container docker-bot-1             Started                                                                                                                                                                   0.7s 
 ✔ Container docker-worker-1          Started                                                                                                                                                                   1.5s 
 ✔ Container docker-api-1             Started                                                                                                                                                                   1.4s 
 ✔ Container docker-nginx-1           Started        

$ docker compose logs api --tail=5
WARN[0000] /home/********/dify/docker/docker-compose.yaml: `version` is obsolete       👈👈👈👈👈
api-1  | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
api-1  | [2024-06-24 12:57:14 +0000] [22] [INFO] Starting gunicorn 22.0.0
api-1  | [2024-06-24 12:57:14 +0000] [22] [INFO] Listening at: http://0.0.0.0:5001 (22)
api-1  | [2024-06-24 12:57:14 +0000] [22] [INFO] Using worker: gevent
api-1  | [2024-06-24 12:57:14 +0000] [37] [INFO] Booting worker with pid: 37

$ docker compose exec api flask db history
WARN[0000] /home/********/dify/docker/docker-compose.yaml: `version` is obsolete        👈👈👈👈👈
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
4e99a8df00ff -> 7b45942e39bb (head), add-api-key-auth-binding
64a70a7aab8b -> 4e99a8df00ff, add load balancing
03f98355ba0e -> 64a70a7aab8b, add workflow run index
9e98fbaffb88 -> 03f98355ba0e, add workflow tool label and tool bindings idx
.....

Fixes # (issue)

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Tried invoking docker compose commands such as down, up, logs, ps, pull, start, stop and confirmed that there is no warning

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes
**Original Pull Request:** https://github.com/langgenius/dify/pull/5553 **State:** closed **Merged:** Yes --- # Description This PR removes the line `version: '3'` from all `docker-compose*.yaml` files. The `version` element is already obsoleted, and causes warning to be shown in the newer compose plugin: > The top-level version property is defined by the Compose Specification for backward compatibility. It is only informative and you'll receive a warning message that it is obsolete if used. > https://docs.docker.com/compose/compose-file/04-version-and-name/ Example warnings are here; the same warning will be shown on any other `docker compose` commands: ```bash $ docker compose up -d WARN[0000] /home/********/dify/docker/docker-compose.yaml: `version` is obsolete 👈👈👈👈👈 [+] Running 12/12 ✔ Network docker_ssrf_proxy_network Created 0.1s ✔ Network docker_default Created 0.1s ✔ Container docker-sandbox-1 Started 0.5s ✔ Container docker-weaviate-1 Started 0.8s ✔ Container docker-web-1 Started 0.6s ✔ Container docker-db-1 Started 0.7s ✔ Container docker-ssrf_proxy-1 Started 0.9s ✔ Container docker-redis-1 Started 0.6s ✔ Container docker-bot-1 Started 0.7s ✔ Container docker-worker-1 Started 1.5s ✔ Container docker-api-1 Started 1.4s ✔ Container docker-nginx-1 Started $ docker compose logs api --tail=5 WARN[0000] /home/********/dify/docker/docker-compose.yaml: `version` is obsolete 👈👈👈👈👈 api-1 | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. api-1 | [2024-06-24 12:57:14 +0000] [22] [INFO] Starting gunicorn 22.0.0 api-1 | [2024-06-24 12:57:14 +0000] [22] [INFO] Listening at: http://0.0.0.0:5001 (22) api-1 | [2024-06-24 12:57:14 +0000] [22] [INFO] Using worker: gevent api-1 | [2024-06-24 12:57:14 +0000] [37] [INFO] Booting worker with pid: 37 $ docker compose exec api flask db history WARN[0000] /home/********/dify/docker/docker-compose.yaml: `version` is obsolete 👈👈👈👈👈 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. 4e99a8df00ff -> 7b45942e39bb (head), add-api-key-auth-binding 64a70a7aab8b -> 4e99a8df00ff, add load balancing 03f98355ba0e -> 64a70a7aab8b, add workflow run index 9e98fbaffb88 -> 03f98355ba0e, add workflow tool label and tool bindings idx ..... ``` Fixes # (issue) ## Type of Change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) # How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [x] Tried invoking `docker compose` commands such as `down`, `up`, `logs`, `ps`, `pull`, `start`, `stop` and confirmed that there is no warning # Suggested Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings - [ ] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods - [ ] `optional` I have made corresponding changes to the documentation - [ ] `optional` I have added tests that prove my fix is effective or that my feature works - [ ] `optional` New and existing unit tests pass locally with my changes
yindo added the pull-request label 2026-02-21 20:24:02 -05:00
yindo closed this issue 2026-02-21 20:24:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#24973