-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
59 lines (59 loc) · 2.18 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: '3.8'
services:
dynamodb-local:
# Uncomment if data should be persisted between container restarts
# command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
# volumes:
# - "./docker/dynamodb:/home/dynamodblocal/data"
command: "-jar DynamoDBLocal.jar -sharedDb -inMemory"
image: "amazon/dynamodb-local:latest"
container_name: dynamodb-local
ports:
- "8000:8000"
working_dir: /home/dynamodblocal
networks:
- hydrocron
hydrocron-table-create:
image: "amazon/aws-cli"
container_name: hydrocron-table-create
entrypoint: /bin/sh -c
command: >
"aws dynamodb create-table
--table-name hydrocron-swot-reach-table
--attribute-definitions AttributeName=reach_id,AttributeType=S AttributeName=range_start_time,AttributeType=S
--key-schema AttributeName=reach_id,KeyType=HASH AttributeName=range_start_time,KeyType=RANGE
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
--endpoint-url http://host.docker.internal:8000;
aws dynamodb create-table
--table-name hydrocron-swot-node-table
--attribute-definitions AttributeName=reach_id,AttributeType=S AttributeName=range_start_time,AttributeType=S
--key-schema AttributeName=reach_id,KeyType=HASH AttributeName=range_start_time,KeyType=RANGE
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
--endpoint-url http://host.docker.internal:8000"
depends_on:
- dynamodb-local
networks:
- hydrocron
environment:
HYDROCRON_ENV: LOCAL
HYDROCRON_dynamodb_endpoint_url: http://host.docker.internal:8000
AWS_ACCESS_KEY_ID: fakeMyKeyId
AWS_SECRET_ACCESS_KEY: fakeSecretAccessKey
AWS_DEFAULT_REGION: us-west-2
hydrocron-lambda:
image: "hydrocron:latest"
container_name: hydrocron-lambda
ports:
- "9000:8080"
depends_on:
- hydrocron-table-create
networks:
- hydrocron
environment:
HYDROCRON_ENV: LOCAL
HYDROCRON_dynamodb_endpoint_url: http://host.docker.internal:8000
AWS_ACCESS_KEY_ID: fakeMyKeyId
AWS_SECRET_ACCESS_KEY: fakeSecretAccessKey
AWS_DEFAULT_REGION: us-west-2
networks:
hydrocron: {}