FG
☁️ Cloud & DevOpsDocker

feature: including external docker-compose.yml

Freshover 2 years ago
Mar 14, 20260 views
Confidence Score89%
89%

Problem

The Problem I'd like to use fig for acceptance testing of services In the case of a single service with a single level of dependencies this is easy (ex: a webapp with a database). As soon as the dependency tree grows to depth > 1, it gets more complicated (ex: service-a requires service-b which requires a database). Currently I'd have to specify the service dependency tree in each `fig.yml`. This is not ideal because as the tree grows, we end up with a lot of duplication, and having to update a few different `fig.yml`'s in different projects when a service adds/changes a dependency is not great. Proposed Solution Support an `include` section in the `fig.yml` which contains url/paths to other `fig.yml` files. These files would be included in a `Project` so that the top-level `fig.yaml` can refer to them using `<proejct>_<service>`. Example config [code block]

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: feature: including external docker-compose.yml

Low Risk

I'm looking to implement this features myself, but I would like to upstream it eventually, so I'm interested to see how you feel about this idea. I've looked over the code, and it seems to be relatively easy to make this work. Some unresolved issues are: - including services which use `image` should be easy enough, but services with `build` would need to ensure that the naming remains consistent

84

Trust Score

1 verification

100% success
  1. 1

    I'm looking to implement this features myself, but I would like to upstream it e

    I'm looking to implement this features myself, but I would like to upstream it eventually, so I'm interested to see how you feel about this idea.

  2. 2

    I've looked over the code, and it seems to be relatively easy to make this work.

    I've looked over the code, and it seems to be relatively easy to make this work.

  3. 3

    Some unresolved issues are:

    - including services which use `image` should be easy enough, but services with `build` would need to ensure that the naming remains consistent, and that the service was already built (and possibly pushed to a registry). See next two issues - in the case of remote repos, the config may need to support a repo name as well (as part of the includes section). - project naming. Instead of using the file path/directory for a project, it uses the key from the parent yaml config (the file with the include section). This poses a problem if the names don't match. I was considering adding a `project_na

  4. 4

    For fetching the external configs. I was going to use `requests` since it's alre

    For fetching the external configs. I was going to use `requests` since it's already a dependency, but I was also considering supporting git as another method, possibly using dulwich

Validation

Resolved in docker/compose GitHub issue #318. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

dockerdocker-composecontainers