Skip to content

feat: checks for profiles and env vars for conditional services#185

Merged
briangreunke merged 1 commit into
mainfrom
brian/eng-3108-feat-update-configuration-to-support-db-env-vars
Sep 19, 2025
Merged

feat: checks for profiles and env vars for conditional services#185
briangreunke merged 1 commit into
mainfrom
brian/eng-3108-feat-update-configuration-to-support-db-env-vars

Conversation

@briangreunke
Copy link
Copy Markdown
Contributor

@briangreunke briangreunke commented Sep 19, 2025

Conditional DB/Clickhouse in Platform

If a self-hosted platform user is connecting to a remote database, we don't need to provide containers for the same service. By using "profiles" in the Docker Compose file, we can conditionally start the containers. Additionally, we can use a custom attribute in the compose file x-override. to see if the profile should be included.

Key Changes:

  • the platform start builds a profile list based on compose env

Added:

  • profile building method to check for profile attrs and x-override attrs.

Generated Summary:

  • Introduced DockerError exception to provide more specific error handling for Docker-related errors.
  • Added a new function _get_profiles_to_enable that determines which Docker profiles should be enabled based on the presence of environment variables.
  • Modified the _build_docker_compose_base_command function to include profiles in the command for Docker Compose.
  • Enhanced error handling in _run_docker_compose_command to raise DockerError with relevant messages, improving debugging capability.
  • Adjusted get_available_local_images to process output without skipping the header line, which may be necessary for correct parsing.
  • Updated start_platform to catch DockerError, providing feedback and attempting to stop partially started containers if the platform fails to start.
  • These changes improve clarity in error messaging, enrich the functionality of Docker profile management, and enhance robustness during container startup scenarios.

This summary was generated with ❤️ by rigging

@briangreunke briangreunke marked this pull request as ready for review September 19, 2025 13:07
@briangreunke briangreunke merged commit ea6cf80 into main Sep 19, 2025
9 checks passed
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.

1 participant