Skip to content

Commit

Permalink
Add envs parameter to compose up/config
Browse files Browse the repository at this point in the history
  • Loading branch information
lugoues committed Nov 19, 2022
1 parent db488b7 commit 8fdf961
Show file tree
Hide file tree
Showing 5 changed files with 265 additions and 37 deletions.
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

0 comments on commit 8fdf961

Please sign in to comment.