In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):
- Add
ptvsdto your requirements.txt file
ptvsd == 4.3.2
- To your
launch.json, add this:
| # aws cloudformation deploy --template-file KeepDbStopped.yml --stack-name stop-db --capabilities CAPABILITY_IAM --parameter-overrides DB=arn:aws:rds:us-east-1:XXX:db:XXX | |
| Description: Automatically stop RDS instance every time it turns on due to exceeding the maximum allowed time being stopped | |
| Parameters: | |
| DB: | |
| Description: ARN of database that needs to be stopped | |
| Type: String | |
| AllowedPattern: arn:aws:rds:[a-z0-9\-]+:[0-9]+:db:[^:]* | |
| MaxStartupTime: | |
| Description: Maximum number of minutes to wait between database is automatically started and the time it's ready to be shut down. Extend this limit if your database takes a long time to boot up. | |
| Type: Number |