Skip to content

Commit

Permalink
Remove unused nginx docker files unless no cloud provider is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Oct 17, 2024
1 parent 830a7c5 commit 835bfc0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ def remove_docker_files():
os.remove(os.path.join(".idea", "runConfigurations", file_name))


def remove_nginx_docker_files():
shutil.rmtree(os.path.join("compose", "production", "nginx"))


def remove_utility_files():
shutil.rmtree("utility")

Expand Down Expand Up @@ -457,6 +461,8 @@ def main():

if "{{ cookiecutter.use_docker }}".lower() == "y":
remove_utility_files()
if "{{ cookiecutter.cloud_provider }}".lower() != "none":
remove_nginx_docker_files()
else:
remove_docker_files()

Expand Down

0 comments on commit 835bfc0

Please sign in to comment.