komponist icon indicating copy to clipboard operation
komponist copied to clipboard

[docker-compose] Refactor the generated compose file to use the `include` spec

Open shantanoo-desai opened this issue 1 year ago • 0 comments

Description

Currently, the split docker-compose.<service>.yml files are combined together using docker compose config -o docker-compose.yml. With the new [include][1] spec in the updated Compose versions, it is not possible to have a simplified main docker-compose.yml file and it can still be validated using docker compose config

Effort

Refactoring will be required in the form of a Jinja2 template for all the configured services into a main docker-compose.yml.j2 with a list as follows:

include:
  - path: ./docker-compose.<serviceA>.yml
  - path: ./docker-compose.<serviceB>.yml 

This refactoring may be beneficial to include custom Docker Apps into the existing Compose project.

shantanoo-desai avatar Oct 24 '23 10:10 shantanoo-desai