diff --git a/adit_radis_shared/invoke_tasks.py b/adit_radis_shared/invoke_tasks.py index a969b4a..6c42f92 100644 --- a/adit_radis_shared/invoke_tasks.py +++ b/adit_radis_shared/invoke_tasks.py @@ -85,7 +85,11 @@ def get_compose_env_file(): return Utility.get_project_dir() / "docker-compose.dev.yml" @staticmethod - def get_stack_name(): + def get_stack_name() -> str: + config = Utility.load_config_from_env_file() + if stack_name := config.get("STACK_NAME", ""): + return stack_name + if Utility.is_production(): return f"{Utility.get_project_name()}_prod" return f"{Utility.get_project_name()}_dev" diff --git a/example.env b/example.env index c5745b8..321717b 100644 --- a/example.env +++ b/example.env @@ -74,3 +74,8 @@ SSL_CHAIN_FILE="./chain.pem" # The timezone that the web interface uses. USER_TIME_ZONE="Europe/Berlin" + +# An optional name of the stack (or compose project in development). +# When not set it defaults to the project name with suffix "_dev" resp. "_prod". +# For ADIT "adit_dev" and "adit_prod". For RADIS "radis_dev" and "radis_prod". +STACK_NAME=