-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
32 lines (31 loc) · 969 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
version: '3'
services:
dynamodb-local:
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
image: "amazon/dynamodb-local:latest"
user: root
ports:
- "8000:8000"
volumes:
- "./docker/dynamodb:/home/dynamodblocal/data"
working_dir: /home/dynamodblocal
healthcheck:
test: ["CMD-SHELL", '[ "$(curl -s -o /dev/null -I -w ''%{http_code}'' http://localhost:8000)" == "400" ]']
interval: 10s
timeout: 10s
retries: 10
dynamodb-local-setup:
depends_on:
dynamodb-local:
condition: service_healthy
image: amazon/aws-cli
volumes:
- "./schemas:/tmp/dynamo"
environment:
AWS_ACCESS_KEY_ID: 'FAKEID'
AWS_SECRET_ACCESS_KEY: 'FAKEKEY'
AWS_REGION: 'us-east-1'
entrypoint:
- bash
command:
'-c "for f in /tmp/dynamo/*.json; do aws dynamodb create-table --endpoint-url "http://dynamodb-local:8000" --cli-input-json file://"$${f#./}"; done"'