From b30188c8dc4c82e380cc587f2f07e2cdfdbeea4c Mon Sep 17 00:00:00 2001 From: ldericher <40151420+ldericher@users.noreply.github.com> Date: Mon, 21 Feb 2022 23:35:48 +0100 Subject: [PATCH] rename docker-compose variables --- example/hello_world/docker-compose.yml | 6 +++--- kiwi_scp/project.py | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/example/hello_world/docker-compose.yml b/example/hello_world/docker-compose.yml index 2cc054d..33c6f1a 100644 --- a/example/hello_world/docker-compose.yml +++ b/example/hello_world/docker-compose.yml @@ -31,7 +31,7 @@ services: environment: MYSQL_ROOT_PASSWORD: changeme volumes: - - "${TARGETDIR}/db:/var/lib/mysql" + - "${KIWI_PROJECT}/db:/var/lib/mysql" adminer: # admin interface for databases @@ -46,10 +46,10 @@ services: - "8081:8080" another-web: - # Another webserver just to show off the ${CONFIGDIR} variable + # Another webserver just to show off the ${KIWI_CONFIG} variable image: nginx:stable-alpine restart: unless-stopped ports: - "8082:80" volumes: - - "${CONFIGDIR}/html/index.html:/usr/share/nginx/html/index.html:ro" + - "${KIWI_CONFIG}/html/index.html:/usr/share/nginx/html/index.html:ro" diff --git a/kiwi_scp/project.py b/kiwi_scp/project.py index d816a7a..0801dc3 100644 --- a/kiwi_scp/project.py +++ b/kiwi_scp/project.py @@ -39,18 +39,18 @@ class Project: directory: Path = self.directory project_name: str = self.name kiwi_hub_name: str = self.parent_instance.config.network.name - target_root_dir: Path = self.parent_instance.config.storage.directory - conf_dir: Path = target_root_dir.joinpath(CONFIG_DIRECTORY_NAME) - target_dir: Path = target_root_dir.joinpath(project_name) + kiwi_instance_dir: Path = self.parent_instance.config.storage.directory + kiwi_config_dir: Path = kiwi_instance_dir.joinpath(CONFIG_DIRECTORY_NAME) + kiwi_project_dir: Path = kiwi_instance_dir.joinpath(project_name) result: Dict[str, Any] = { "cwd": str(directory), "env": { "COMPOSE_PROJECT_NAME": project_name, "KIWI_HUB_NAME": kiwi_hub_name, - "TARGETROOT": str(target_root_dir), - "CONFIGDIR": str(conf_dir), - "TARGETDIR": str(target_dir), + "KIWI_INSTANCE": str(kiwi_instance_dir), + "KIWI_CONFIG": str(kiwi_config_dir), + "KIWI_PROJECT": str(kiwi_project_dir), }, }