Allow users to place docker-compose.override.yaml in the docker directory without it being tracked by git #9932

Closed
opened 2026-02-21 18:40:45 -05:00 by yindo · 0 comments
Owner

Originally created by @kurokobo on GitHub (Mar 8, 2025).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Docker Compose automatically reads the docker-compose.override.yaml file in addition to the standard docker-compose.yaml file:

By default, Compose reads two files, a compose.yaml and an optional compose.override.yaml file. By convention, the compose.yaml contains your base configuration. The override file can contain configuration overrides for existing services or entirely new services.
https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/

This file is very useful when users want to customize the docker-compose.yaml without modifying it directly.
By only placing override file and specifying the parts we want to change, Docker Compose will automatically merge and start the containers with customized configuration.

- docker/
  - docker-compose.yaml
  - docker-compose.override.yaml
# docker-compose.override.yaml
services:
  # Override the image of the api service
  api:
    image: registry.example.com/demo/dify-api:custom

  # Override the image of the worker service
  worker:
    image: registry.example.com/demo/dify-api:custom

  # Add environment variables to the plugin_daemon service
  plugin_daemon:
    environment:
      HOGE: fuga
      FOO: bar

  # Add a new service like side-car
  new_service:
    image: registry.example.com/demo/demo-new-service:latest
    restart: always
    environment:
      FOO: bar
# No changes are required for any compose commands
$ docker compose up -d

Currently, placing this file will make it being tracked by Git.
To make it easier for users to customize using this file, it would be helpful to add this file to .gitignore.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @kurokobo on GitHub (Mar 8, 2025). ### Self Checks - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. Docker Compose automatically reads the **`docker-compose.override.yaml`** file in addition to the standard `docker-compose.yaml` file: > By default, Compose reads two files, a compose.yaml and an optional compose.override.yaml file. By convention, the compose.yaml contains your base configuration. The override file can contain configuration overrides for existing services or entirely new services. > https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/ This file is very useful when users want to customize the `docker-compose.yaml` without modifying it directly. By only placing override file and specifying the parts we want to change, Docker Compose will automatically merge and start the containers with customized configuration. ```bash - docker/ - docker-compose.yaml - docker-compose.override.yaml ``` ```yaml # docker-compose.override.yaml services: # Override the image of the api service api: image: registry.example.com/demo/dify-api:custom # Override the image of the worker service worker: image: registry.example.com/demo/dify-api:custom # Add environment variables to the plugin_daemon service plugin_daemon: environment: HOGE: fuga FOO: bar # Add a new service like side-car new_service: image: registry.example.com/demo/demo-new-service:latest restart: always environment: FOO: bar ``` ```bash # No changes are required for any compose commands $ docker compose up -d ``` Currently, placing this file will make it being tracked by Git. To make it easier for users to customize using this file, it would be helpful to add this file to `.gitignore`. ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 18:40:45 -05:00
yindo closed this issue 2026-02-21 18:40:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#9932