mirror of
				https://github.com/cookiecutter/cookiecutter-django.git
				synced 2025-11-04 09:57:30 +03:00 
			
		
		
		
	fix: remove the aws Dockerfile and remove the awscli definition from production.yml when not selected
This commit is contained in:
		
							parent
							
								
									3b4d6857f0
								
							
						
					
					
						commit
						58f41fc97f
					
				| 
						 | 
					@ -279,6 +279,10 @@ def remove_node_dockerfile():
 | 
				
			||||||
    shutil.rmtree(os.path.join("compose", "local", "node"))
 | 
					    shutil.rmtree(os.path.join("compose", "local", "node"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def remove_aws_dockerfile():
 | 
				
			||||||
 | 
					    shutil.rmtree(os.path.join("compose", "production", "aws"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def main():
 | 
					def main():
 | 
				
			||||||
    debug = "{{ cookiecutter.debug }}".lower() == "y"
 | 
					    debug = "{{ cookiecutter.debug }}".lower() == "y"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -302,6 +306,9 @@ def main():
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        remove_docker_files()
 | 
					        remove_docker_files()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if "{{ cookiecutter.use_docker }}".lower() == "y" and "{{ cookiecutter.cloud_provider}}".lower() != 'aws':
 | 
				
			||||||
 | 
					        remove_aws_dockerfile()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if "{{ cookiecutter.use_heroku }}".lower() == "n":
 | 
					    if "{{ cookiecutter.use_heroku }}".lower() == "n":
 | 
				
			||||||
        remove_heroku_files()
 | 
					        remove_heroku_files()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -65,6 +65,8 @@ services:
 | 
				
			||||||
    command: /start-flower
 | 
					    command: /start-flower
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  {%- endif %}
 | 
					  {%- endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  {% if cookiecutter.cloud_provider == 'AWS' %}
 | 
				
			||||||
  awscli:
 | 
					  awscli:
 | 
				
			||||||
    build:
 | 
					    build:
 | 
				
			||||||
      context: .
 | 
					      context: .
 | 
				
			||||||
| 
						 | 
					@ -73,3 +75,4 @@ services:
 | 
				
			||||||
      - ./.envs/.production/.django
 | 
					      - ./.envs/.production/.django
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - production_postgres_data_backups:/backups
 | 
					      - production_postgres_data_backups:/backups
 | 
				
			||||||
 | 
					  {%- endif %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user