tilt-dev / tilt-dev/tilt

support for docker compose profiles

Open
#4,703 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

From a Twitter DM:

Hi there! I'm getting started with Tilt and I'd to spin up my services with the use of the Docker Compose file. I was wondering if there's a way to set the profiles parameter: https://docs.docker.com/compose/profiles/

In theory, setting the environment variable COMPOSE_PROFILES should "Just Work" because Tilt passes the env variable onto the docker-compose CLI. But the reporter couldn't get this to work:

Hey, thank you for the quick reply! It's good to know that should work, I've tried defining the COMPOSE_PROFILES env var on my .env file and also by using os.setenv on the Tilt file but it didn't work. I'll try defining it on the command line today to see if that works. However, I managed to spin up my services individually with the use of this workaround https://github.com/tilt-dev/tilt/issues/3223#issuecomment-619448809

I haven't spent any time trying this out myself. It might be a bug in Tilt, or a bug in Docker Compose, or something else.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Docker Compose profiles with COMPOSE_PROFILES set in a .env file, through os.setenv in the Tilt file, and on the command line. Compare the behavior with the individual-service workaround in issue 3223, then determine whether the problem is in Tilt or Docker Compose and confirm the expected profile behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.