Next
- redirect the user to homepage when they are not authorized
- split code in app.py into multiple files
Drive Gooder
Setup
- Install
ffmpeg
- Install Python 3.x
- Install
espeak
- Install
mecab
(at least on M1 Macs)
- Install
poetry
(pip install poetry
)
Docker / AWS
Build Container
docker build . -f cloud/Dockerfile -t drive-gooder-container-repository:{tag}
Run Container Locally
docker run -p 5003:5003 --env-file test.env drive-gooder-container-repository:{tag}
Push Container to ECR
Will need to have the aws cli installed.
Recommend to look at the View push commands
output for the ecr repository in AWS.
- aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin {special-uri-for-ecr-instance}
- docker tag drive-gooder-container-repository:{tag} {ecr-uri}:{tag}
- docker push {ecr-uri}:{tag}
Update ECS to use new container
- Get to task definitions in aws
- Go to the task currently named
first-run-task-definition
- Open up the latest revision
- Click to
Create new revision
- Click on the container definition.
- Change version in the image section.
Add new Secret
- Navigate to the secret manager in aws
- Open up the defined secret.
- In the
Secret Value
section click Retrieve secret value
- Click
edit
and make necessary changes.
- Update ecs by creating new task definition with new environment variable mapped to the new secret. (can follow instructions for update ECS to use new container)