diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index ff84f180..95815564 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -279,6 +279,10 @@ def remove_node_dockerfile(): shutil.rmtree(os.path.join("compose", "local", "node")) +def remove_aws_dockerfile(): + shutil.rmtree(os.path.join("compose", "production", "aws")) + + def main(): debug = "{{ cookiecutter.debug }}".lower() == "y" @@ -302,6 +306,9 @@ def main(): else: remove_docker_files() + if "{{ cookiecutter.use_docker }}".lower() == "y" and "{{ cookiecutter.cloud_provider}}".lower() != 'aws': + remove_aws_dockerfile() + if "{{ cookiecutter.use_heroku }}".lower() == "n": remove_heroku_files() diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 331cbba6..62ec9d82 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -65,6 +65,8 @@ services: command: /start-flower {%- endif %} + + {% if cookiecutter.cloud_provider == 'AWS' %} awscli: build: context: . @@ -73,3 +75,4 @@ services: - ./.envs/.production/.django volumes: - production_postgres_data_backups:/backups + {%- endif %}