Skip to content

Commit

Permalink
chore(deps): add docker-compose.yml for DynamoDB Local
Browse files Browse the repository at this point in the history
  • Loading branch information
bklebe committed Feb 22, 2024
1 parent ff123f8 commit f199993
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
17 changes: 3 additions & 14 deletions apps/api_accounts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,10 @@ end

## Setting Up DynamoDB Local

Download [DynamoDB local](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html).
Make sure you have Docker installed, and then run

```
(mkdir -p bin/dynamodb && \
cd bin/dynamodb && \
curl -O https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz && \
tar -xzf dynamodb_local_latest.tar.gz && \
rm dynamodb_local_latest.tar.gz)
```

Run the JAR file to start the local DynamoDB server:

```
(export DYNAMODB_PATH=./bin/dynamodb && \
java -Djava.library.path=${DYNAMODB_PATH}/DynamoDBLocal_lib -jar ${DYNAMODB_PATH}/DynamoDBLocal.jar -sharedDb)
```shell
docker compose up
```

Once DynamoDB is running, you can create a new admin user:
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3.8"
services:
dynamodb-local:
command: "-jar DynamoDBLocal.jar -sharedDb -inMemory"
image: "amazon/dynamodb-local:2.0.0"
container_name: dynamodb-local
ports:
- "8000:8000"
working_dir: /home/dynamodblocal

0 comments on commit f199993

Please sign in to comment.