Skip to content

Commit

Permalink
Merge pull request #51 from EyeSeeTea/feature/add-namespace-48
Browse files Browse the repository at this point in the history
Add d2-docker start --deploy-path option
  • Loading branch information
ifoche authored Jul 15, 2020
2 parents 609c955 + 937d2b7 commit f3d4db1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/d2_docker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def run_docker_compose(
load_from_data=True,
post_sql_dir=None,
scripts_dir=None,
deploy_path="",
deploy_path=None,
dhis2_auth=None,
tomcat_server=None,
**kwargs,
Expand All @@ -227,11 +227,11 @@ def run_docker_compose(
# Set default values for directory, required by docker-compose volumes section
("POST_SQL_DIR", post_sql_dir_abs),
("SCRIPTS_DIR", scripts_dir_abs),
("DEPLOY_PATH", deploy_path),
("DHIS2_AUTH", dhis2_auth),
("DEPLOY_PATH", deploy_path or ""),
("DHIS2_AUTH", dhis2_auth or ""),
("TOMCAT_SERVER", get_abs_file_for_docker_volume(tomcat_server)),
]
env = dict((k, v) for (k, v) in [pair for pair in env_pairs if pair] if v)
env = dict((k, v) for (k, v) in [pair for pair in env_pairs if pair] if v is not None)

yaml_path = os.path.join(os.path.dirname(__file__), "docker-compose.yml")
return run(["docker-compose", "-f", yaml_path, "-p", project_name, *args], env=env, **kwargs)
Expand Down

0 comments on commit f3d4db1

Please sign in to comment.