Skip to content

Commit

Permalink
feature/CPF-34 bring back docker-compose.yml and entrypoint/init-aws,…
Browse files Browse the repository at this point in the history
… ignore volume/ folder
  • Loading branch information
Vikariusu committed Dec 21, 2023
1 parent d996a68 commit 0b144cb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ dist
terraform/.terraform
.tool-versions

localstack/
localstack/volume/
17 changes: 17 additions & 0 deletions localstack/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "3.8"

services:
localstack:
container_name: "cpf-reporter-localstack-main"
image: localstack/localstack
ports:
- "4566:4566" # LocalStack Gateway
- "4510-4559:4510-4559" # external services port range
environment:
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
- AWS_DEFAULT_REGION=${AWS_REGION:-us-west-2}
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./entrypoint/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh"
16 changes: 16 additions & 0 deletions localstack/entrypoint/init-aws.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! /bin/bash

export AWS_ACCESS_KEY_ID="test"
export AWS_SECRET_ACCESS_KEY="test"

VALID_EMAILS=(
"[email protected]"
)

for email in "${VALID_EMAILS[@]}"; do
awslocal ses verify-email-identity --email-address ${email}
echo "Verified ${email} to send with localstack SES"
done

awslocal s3api create-bucket --bucket cpf-reporter --region us-west-2 --create-bucket-configuration '{"LocationConstraint": "us-west-2"}'

0 comments on commit 0b144cb

Please sign in to comment.