Skip to content

Use multiple compose and env files #1

Description

@Taucher2003

To avoid the problem of maintaining the docker-compose.yml and the .env files we can use merging instead. The docker-compose.yml will be used as the first file and then hydra adds a second file with the templating for the settings it needs to override. The same applies to the .env file.

Mensa uses this concept already at https://github.com/code0-tech/mensa/tree/main/modules/docker/codezero (the original docker-compose.yml and .env is located in the vendor directory and gets merged with docker-compose.actions.yml and docker-compose.override.yml. (The override.env contains secrets and is therefore generated at runtime by terraform instead of being committed to the repository)

See https://docs.docker.com/reference/compose-file/merge/ and https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

System

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions