Skip to content

Sync compose env_file fixture for generated Docker projects#1911

Open
snvtac wants to merge 1 commit into
iii-hq:mainfrom
snvtac:snvtac/1884-compose-env-file
Open

Sync compose env_file fixture for generated Docker projects#1911
snvtac wants to merge 1 commit into
iii-hq:mainfrom
snvtac:snvtac/1884-compose-env-file

Conversation

@snvtac

@snvtac snvtac commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • mirror the generated Docker compose template change by adding env_file: .env to the iii service fixture
  • document that the generated .env is read by the engine while expanding ${VAR} placeholders
  • add project init/generate-docker e2e assertions that generated compose files include env_file: .env

Runtime template

Validation

  • cargo fmt --all -- --check
  • cargo test -p iii --test project_init_e2e docker
  • cargo clippy -p iii --test project_init_e2e -- --cap-lints warn
  • git diff --check
  • YAML parse and structural check that services.iii.env_file == ".env" for both the fixture and templates PR checkout

Notes

  • cargo clippy -p iii --test project_init_e2e -- -D warnings currently fails on existing unrelated lints in crates/iii-shell-client/src/lib.rs (== None comparisons), so the scoped clippy validation was rerun with --cap-lints warn.

Refs #1884

Summary by CodeRabbit

  • Bug Fixes

    • Generated Docker Compose setups now load variables from .env for the engine container, improving support for environment-based configuration.
    • Clarified Docker template guidance so the generated .env behavior is described more accurately.
  • Tests

    • Added coverage to verify generated Docker Compose files include .env loading.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 60b33029-f70d-4395-858f-1e86246b0876

📥 Commits

Reviewing files that changed from the base of the PR and between 4b41d9e and bab6058.

📒 Files selected for processing (3)
  • engine/src/cli/project/mod.rs
  • engine/tests/fixtures/templates/docker/docker-compose.yml
  • engine/tests/project_init_e2e.rs

📝 Walkthrough

Walkthrough

The Docker compose fixture now loads .env for the iii service, the generator comment describes the generated RabbitMQ credentials, and the project-init e2e tests now verify the compose file includes env_file: .env.

Changes

Docker compose env forwarding

Layer / File(s) Summary
Compose env_file wiring
engine/src/cli/project/mod.rs, engine/tests/fixtures/templates/docker/docker-compose.yml
The generated Docker compose template loads .env for the iii service, and the adjacent comment describes the generated RabbitMQ credentials used by placeholder expansion and the commented RabbitMQ service.
E2E compose assertion
engine/tests/project_init_e2e.rs
A shared helper checks that docker-compose.yml contains env_file: .env, and both Docker init flows call it.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Possibly related issues

Possibly related PRs

  • iii-hq/iii#1621: Also changes Docker template generation and docker-compose.yml environment handling around iii project init --docker.

Suggested reviewers

  • anthonyiscoding

Poem

🐰 I hopped through YAML under moonbeam bright,
.env now joins the docker light.
Rabbit creds wiggle, tests give a cheer,
Compose can sniff them, line by line, clear!
Hoppy deployments, carrot-fueled delight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding env_file: .env to the generated Docker Compose fixture and keeping it in sync.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@snvtac is attempting to deploy a commit to the motia Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants