Skip to content

Commit

Permalink
add localstack
Browse files Browse the repository at this point in the history
  • Loading branch information
gidsg committed May 20, 2024
1 parent f85fdf4 commit 8f56607
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,23 @@ services:
- DATABASE_URL=postgresql://postgres:password@database:5432/postgres
depends_on:
- database
- localstack
database:
restart: unless-stopped
image: postgres:14
environment:
POSTGRES_PASSWORD: password
localstack:
image: localstack/localstack
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
- AWS_REGION=${AWS_REGION:-eu-central-1}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-test}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-test}
volumes:
- "./scripts/localstack-script.sh:/etc/localstack/init/ready.d/script.sh"
- "/var/run/docker.sock:/var/run/docker.sock"
11 changes: 11 additions & 0 deletions scripts/localstack-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

awslocal s3api \
create-bucket --bucket data-store-failed-files-dev \
--create-bucket-configuration LocationConstraint=eu-central-1 \
--region eu-central-1

awslocal s3api \
create-bucket --bucket data-store-successful-files-dev \
--create-bucket-configuration LocationConstraint=eu-central-1 \
--region eu-central-1

0 comments on commit 8f56607

Please sign in to comment.