tilt-dev / tilt-dev/tilt

Tilt should load COMPOSE_PROJECT_NAME from the .env file

Open
#6,038 2 comments 0 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

Expected Behavior

docker-compose project name should be loaded from the .env file, if it is present.

Current Behavior

if docker_compose project_name is not specified, than the current directory name is used.
docker_compose.go

Context
About Your Use Case

I try to introduce tilt to our developers and we heavily relying on COMPOSE_PROJECT_NAME defined in the dotenv file.

Workaround

As a workaround I added the following lines to my Tiltfile

load('ext://dotenv', 'dotenv')
dotenv()
docker_compose('docker-compose.yml',project_name=os.environ['COMPOSE_PROJECT_NAME'])

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 with internal/tiltfile/docker_compose.go around line 144 and trace the docker_compose entry point's project-name handling. Check how COMPOSE_PROJECT_NAME is obtained from a present .env file when no explicit project_name is supplied. Done means docker-compose uses that value instead of the current directory name, while preserving explicit project_name behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, go
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.