-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
51 lines (48 loc) · 1.71 KB
/
docker-compose.yaml
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
name: gridwalk
services:
geodatabase:
image: postgis/postgis:16-3.4
container_name: gridwalk-geodatabase
platform: linux/amd64
volumes:
- ./local/postgresql/data:/var/lib/postgresql/data
environment:
POSTGRES_DB: gridwalk
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
dynamodb:
image: amazon/dynamodb-local:latest
container_name: gridwalk-dynamodb
ports:
- "8000:8000"
volumes:
- ./local/dynamodb:/home/dynamodblocal/data
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath /home/dynamodblocal/data"
dynamodb-local-init:
image: amazon/aws-cli:2.22.33
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
AWS_DEFAULT_REGION: us-east-1
entrypoint: /usr/bin/env bash
command: >
-c '
aws dynamodb create-table \
--table-name gridwalk \
--attribute-definitions \
AttributeName=PK,AttributeType=S \
AttributeName=SK,AttributeType=S \
AttributeName=user_id,AttributeType=S \
AttributeName=con_id,AttributeType=S \
--key-schema \
AttributeName=PK,KeyType=HASH \
AttributeName=SK,KeyType=RANGE \
--global-secondary-indexes \
"[ \
{\"IndexName\":\"user\",\"KeySchema\":[{\"AttributeName\":\"user_id\",\"KeyType\":\"HASH\"}],\"Projection\":{\"ProjectionType\":\"ALL\"}}, \
{\"IndexName\":\"con\",\"KeySchema\":[{\"AttributeName\":\"con_id\",\"KeyType\":\"HASH\"}],\"Projection\":{\"ProjectionType\":\"ALL\"}} \
]" \
--billing-mode PAY_PER_REQUEST \
--endpoint-url http://dynamodb:8000'