Created
          November 25, 2021 07:42 
        
      - 
      
- 
        Save aminmarashi/e3174dc261ee7f575b1adc1b9b386e16 to your computer and use it in GitHub Desktop. 
    Manually apply docker ECS up with cloudformation templates
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| if [ -z $2 ]; then | |
| echo "Usage: $0 [up|down] [stack name]" | |
| exit 1 | |
| fi | |
| if [ $1 == 'up' ]; then | |
| aws cloudformation create-stack --stack-name $2 --capabilities=CAPABILITY_IAM --template-body file://<(docker compose convert) | |
| elif [ $1 == 'down' ]; then | |
| aws cloudformation delete-stack --stack-name $2 | |
| else | |
| echo "Unsupported action: $1, supported actions: up, down" | |
| exit 1 | |
| fi | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment