feat: configure containers via CLI args#175
Merged
briangreunke merged 12 commits intomainfrom Sep 15, 2025
Merged
Conversation
rdheekonda
reviewed
Sep 11, 2025
rdheekonda
approved these changes
Sep 11, 2025
Contributor
rdheekonda
left a comment
There was a problem hiding this comment.
Great work, @briangreunke !
Contributor
Author
|
Good call. The comment was a remnant before a refactor. Will fix. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This change enables users to configure the Dreadnode platform via CLI arguments using the format dreadnode platform start --key value, providing a more flexible alternative to manual environment file editing.
- Removed automatic
.envfile generation and switched to passing existing environment files directly to Docker Compose - Added support for environment variable overrides through CLI arguments on the
startcommand - Enhanced
configurecommand to accept key-value pairs for persistent configuration management
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added types-pyyaml dependency for better YAML type checking |
| dreadnode/eval/dataset.py | Removed type ignore comment for yaml import after adding proper typing |
| dreadnode/cli/platform/utils/versions.py | Added get_local_version function for retrieving specific platform versions |
| dreadnode/cli/platform/utils/env_mgmt.py | Replaced env file merging with new override system and added utilities for managing override files |
| dreadnode/cli/platform/upgrade.py | Simplified upgrade process to copy override files instead of merging |
| dreadnode/cli/platform/stop.py | Updated to use new docker_stop signature |
| dreadnode/cli/platform/start.py | Added support for environment overrides via CLI arguments |
| dreadnode/cli/platform/schemas.py | Added properties for override file paths and version details |
| dreadnode/cli/platform/download.py | Fixed services parameter type conversion |
| dreadnode/cli/platform/docker_.py | Refactored to support multiple compose and env files with override capabilities |
| dreadnode/cli/platform/constants.py | Added type safety for platform services |
| dreadnode/cli/platform/configure.py | Completely rewritten to support key-value configuration pairs |
| dreadnode/cli/platform/cli.py | Enhanced start and configure commands with CLI argument support |
Comments suppressed due to low confidence (3)
dreadnode/cli/platform/configure.py:1
- When
unsetis True, this code attempts to accessargs[i + 1]which may not exist. The code should only accessargs[i + 1]whennot unsetis True.
from dreadnode.cli.platform.constants import SERVICES
dreadnode/cli/platform/configure.py:1
- When
unsetis True, the code doesn't validate that args length is correct. For unset operations, you likely need exactly one argument per key to unset, so this should validatelen(args) == 0whenunsetis True with no keys provided.
from dreadnode.cli.platform.constants import SERVICES
dreadnode/cli/platform/configure.py:1
- When
unsetis True, the loop still increments by 2, but it should increment by 1 since unset operations only need keys, not key-value pairs.
from dreadnode.cli.platform.constants import SERVICES
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configurations via CLI args
This change allows users to configure the install via the CLI like
dreadnode platform start --key valueKey Changes:
.envfile and instead pass in both existing .env files for compose interpolationstartcommandGenerated Summary:
startcommand to accept**env_overridesfor dynamic environment variable assignment.docker_runto include an optional overrides environment file when launching Docker containers.write_overrides_envandremove_overrides_envfunctions for managing the overrides environment file.generate_env_fileandremove_generated_env_filefunctions for cleaner codebase.start_platformandstop_platformfunctions to handle new environment variables and file overrides effectively.overrides_env_filetoLocalVersionSchemato facilitate the path to the overrides file.This summary was generated with ❤️ by rigging