-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (80 loc) · 2.74 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3.1'
services:
data-warehouse:
image: postgres:15
container_name: postgres15-analytics-platform
volumes:
- ./local/postgresql/data:/var/lib/postgresql/data
environment:
POSTGRES_DB: warehouse
POSTGRES_USER: user
POSTGRES_PASSWORD: password
ports:
- "5433:5432"
dynamodb-local:
command: "-jar DynamoDBLocal.jar -inMemory -sharedDb"
image: "amazon/dynamodb-local:latest"
container_name: dynamodb-local-analytics-platform
ports:
- "8090:8000"
dynamodb-local-init:
depends_on:
- dynamodb-local
image: amazon/aws-cli
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
command: >-
dynamodb create-table
--table-name analyticsplatform
--attribute-definitions
AttributeName=PK,AttributeType=S
AttributeName=SK,AttributeType=S
AttributeName=GSI1PK,AttributeType=S
AttributeName=GSI1SK,AttributeType=S
AttributeName=GSI2PK,AttributeType=S
AttributeName=GSI2SK,AttributeType=S
--key-schema
AttributeName=PK,KeyType=HASH
AttributeName=SK,KeyType=RANGE
--global-secondary-indexes
"[
{
\"IndexName\": \"GSI1\",
\"KeySchema\": [
{\"AttributeName\":\"GSI1PK\",\"KeyType\":\"HASH\"},
{\"AttributeName\":\"GSI1SK\",\"KeyType\":\"RANGE\"}
],
\"Projection\":{
\"ProjectionType\":\"ALL\"
}
},
{
\"IndexName\": \"GSI2\",
\"KeySchema\": [
{\"AttributeName\":\"GSI2PK\",\"KeyType\":\"HASH\"},
{\"AttributeName\":\"GSI2SK\",\"KeyType\":\"RANGE\"}
],
\"Projection\":{
\"ProjectionType\":\"ALL\"
}
}
]"
--billing-mode PAY_PER_REQUEST
--endpoint-url http://dynamodb-local:8000 --region eu-west-2
dynamodb-local-init-ui:
depends_on:
- dynamodb-local
image: amazon/aws-cli
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
command: >-
dynamodb create-table
--table-name analyticsplatform-ui
--attribute-definitions
AttributeName=PK,AttributeType=S
--key-schema
AttributeName=PK,KeyType=HASH
--billing-mode PAY_PER_REQUEST
--endpoint-url http://dynamodb-local:8000 --region eu-west-2