-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (43 loc) · 1.07 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
version: '3.9'
services:
dynamodb:
image: "amazon/dynamodb-local"
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "sh", "-c", "curl -s -o /dev/null -I -w '%{http_code}' http://localhost:8000 | grep -q 400"]
interval: 10s
timeout: 10s
retries: 10
aws-cli:
depends_on:
dynamodb:
condition: service_healthy
image: amazon/aws-cli
volumes:
- "./schemas:/tmp/dynamo"
environment:
AWS_ACCESS_KEY_ID: 'fake'
AWS_SECRET_ACCESS_KEY: 'fake'
AWS_REGION: 'us-east-1'
command: >
dynamodb create-table
--endpoint-url http://dynamodb:8000
--table-name order_payment
--attribute-definitions AttributeName=order_id,AttributeType=N
--key-schema AttributeName=order_id,KeyType=HASH
--billing-mode PAY_PER_REQUEST
api:
depends_on:
dynamodb:
condition: service_healthy
build: .
environment:
SPRING_PROFILES_ACTIVE: "dev"
ports:
- "8080:8080"
networks:
- bridge-network
networks:
bridge-network:
driver: bridge