Harrolee / drive-gooder

don't read and drive
Other
0 stars 0 forks source link

Next

Drive Gooder

Setup

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.

  1. aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin {special-uri-for-ecr-instance}
  2. docker tag drive-gooder-container-repository:{tag} {ecr-uri}:{tag}
  3. docker push {ecr-uri}:{tag}

Update ECS to use new container

  1. Get to task definitions in aws
  2. Go to the task currently named first-run-task-definition
  3. Open up the latest revision
  4. Click to Create new revision
  5. Click on the container definition.
  6. Change version in the image section.

Add new Secret

  1. Navigate to the secret manager in aws
  2. Open up the defined secret.
  3. In the Secret Value section click Retrieve secret value
  4. Click edit and make necessary changes.
  5. 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)