Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable COMPOSE_FILE to setup flow. #22299

Merged
merged 1 commit into from
May 30, 2024

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented May 30, 2024

Relates to: AMOENG-599

Description

This PR adds COMPOSE_FILE to the .env setup flow for running the project. This allows users to configure how the project runs in a predictable way.

Context

You could already use COMPOSE_FILE (built in feature of docker compose) but our make setup flow doesn't consider this variable when managing the .env file and so it could be removed. adding it explicitly to the flow ensures a sensible default is maintained and that any user overrides are not erased unintentionally.

Testing

This PR enables several new features locally.

  1. Run web/worker containers without mounting local files. This is useful if you want to test a remote image and not mount your local file system.
DOCKER_DIGEST=<valid digest> COMPOSE_FILE=docker-compose.yml:docker-compose.ci.yml make up

This is the "default" behavior for CI preventing any host files in the runner from influencing the tests.

This will run the digest you pass and not mount local files. You can verify this by creatin a new file on the host, and checking it does NOT exist in the container.

  1. Add additional override/private compose file.

Similarly to the above you can specify a COMPOSE_FILE environment variable either in the cli or in the .env file itself to specify additional compose files to add to your configuration. This is useful for those wanting to run docker-compose.private.yml @wagnerand CC please verify this works as expected.

@KevinMind KevinMind changed the base branch from migrate-all-of-the-things to master May 30, 2024 07:43
@KevinMind KevinMind force-pushed the migrate-all-of-the-things-slim branch 9 times, most recently from 6d318b8 to 8da8c76 Compare May 30, 2024 08:47
@KevinMind KevinMind changed the title Migrate-all-of-the-things-slim Add configurable COMPOSE_FILE to setup flow. May 30, 2024
@KevinMind KevinMind requested a review from diox May 30, 2024 09:00
@KevinMind KevinMind force-pushed the migrate-all-of-the-things-slim branch from 8da8c76 to cc6ea1a Compare May 30, 2024 09:05
@KevinMind KevinMind marked this pull request as ready for review May 30, 2024 09:05
Copy link
Member

@diox diox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes: AMOENG-599

Careful, this was split from the other PR and is not directly fixing this (it's fine since we don't have automation closing JIRA tickets from GitHub PRs, but still...)

@KevinMind
Copy link
Contributor Author

Updated.

@KevinMind KevinMind merged commit f4bdaec into master May 30, 2024
13 checks passed
@KevinMind KevinMind deleted the migrate-all-of-the-things-slim branch May 30, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants