Skip to content

Development: Add global docker image env file#191

Merged
bensofficial merged 1 commit intomainfrom
feat/add-global-docker-image-env-file
Mar 5, 2026
Merged

Development: Add global docker image env file#191
bensofficial merged 1 commit intomainfrom
feat/add-global-docker-image-env-file

Conversation

@bensofficial
Copy link
Copy Markdown
Member

@bensofficial bensofficial commented Mar 3, 2026

ls1intum/Artemis#12122

Summary by CodeRabbit

  • Chores
    • Updated Docker environment configuration handling to support loading settings from multiple sources across container operations including start, stop, logging, and run commands.

@bensofficial bensofficial requested review from Hialus, Mtze and krusche March 3, 2026 19:43
@bensofficial bensofficial self-assigned this Mar 3, 2026
@bensofficial bensofficial requested a review from a team as a code owner March 3, 2026 19:43
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 3, 2026

Walkthrough

A new environment file variable DOCKER_IMAGE_ENV_FILE is introduced and integrated into docker compose commands. All relevant docker invocations (start, stop, artemis_logs, all_logs, run) are updated to pass both environment files via separate --env-file flags, with no changes to control flow or error handling.

Changes

Cohort / File(s) Summary
Environment File Configuration
roles/artemis/templates/artemis-docker.sh.j2
Introduces DOCKER_IMAGE_ENV_FILE variable and updates all docker compose commands to apply both --env-file "$DOCKER_IMAGE_ENV_FILE" and --env-file "$ENV_FILE" flags consistently across start, stop, logging, and run operations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A docker file hops into the scene,
With env flags stacked, a pristine machine,
Two paths to config, both side by side,
The rabbit's shells now compose with pride! 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Development: Add global docker image env file' clearly and concisely describes the main change: introducing a new global Docker image environment file variable for docker compose commands.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-global-docker-image-env-file

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@roles/artemis/templates/artemis-docker.sh.j2`:
- Around line 9-10: DOCKER_IMAGE_ENV_FILE currently points to "{{
artemis_working_directory }}/Artemis/.env" and Docker Compose commands assume it
exists; change the script to detect file existence and build an ENV_FILE_ARGS
variable instead of always passing --env-file: check DOCKER_IMAGE_ENV_FILE and
ENV_FILE with test -f (or [ -f ]) and if present append "--env-file
\"$DOCKER_IMAGE_ENV_FILE\"" (and for ENV_FILE append its arg) into
ENV_FILE_ARGS, then use $ENV_FILE_ARGS in all docker compose invocations (e.g.,
in functions or command invocations that reference
DOCKER_IMAGE_ENV_FILE/ENV_FILE) so commands won’t fail when Artemis/.env is
missing and you can optionally log a clear warning when a file is absent.

ℹ️ Review info

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b43472c and 6ba22b6.

📒 Files selected for processing (1)
  • roles/artemis/templates/artemis-docker.sh.j2

@bensofficial bensofficial added this to the v2.3.0 milestone Mar 5, 2026
@bensofficial bensofficial merged commit d999f02 into main Mar 5, 2026
2 checks passed
@bensofficial bensofficial deleted the feat/add-global-docker-image-env-file branch March 5, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants