diff --git a/apps/api_accounts/README.md b/apps/api_accounts/README.md index c6185291..730b86c8 100644 --- a/apps/api_accounts/README.md +++ b/apps/api_accounts/README.md @@ -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: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..fe1ba71e --- /dev/null +++ b/docker-compose.yml @@ -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