Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add envs parameter to compose up/config/run #380

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions python_on_whales/client_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class ClientConfig:
compose_project_name: Optional[str] = None
compose_project_directory: Optional[ValidPath] = None
compose_compatibility: Optional[bool] = None
compose_envs: Optional[Dict[str, str]] = None
client_call: List[str] = field(default_factory=lambda: ["docker"])
_client_call_with_path: Optional[List[Union[Path, str]]] = None

Expand Down Expand Up @@ -165,6 +166,10 @@ def docker_cmd(self) -> Command:
def docker_compose_cmd(self) -> Command:
return self.client_config.docker_compose_cmd

@property
def docker_compose_envs(self) -> Dict[str, str]:
return self.client_config.compose_envs or {}


class ReloadableObject(DockerCLICaller):
def __init__(
Expand Down
Loading