-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (78 loc) · 2.09 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
version: '3.7'
services:
dynamodb-local:
image: amazon/dynamodb-local:latest
ports:
- '18079:8000'
expose:
- 8000
command: ['-jar', 'DynamoDBLocal.jar', '-sharedDb', '-inMemory']
dynamoInit:
depends_on:
- dynamodb-local
image: banst/awscli
environment:
TABLE_MOVIES: thepixardb_movies
AWS_PROFILE: default
volumes:
- ~/.aws/:/root/.aws:ro
command: dynamodb create-table --endpoint-url http://dynamodb-local:8000 --billing-mode PAY_PER_REQUEST --region sa-east-1 --table-name thepixardb_movies --attribute-definitions AttributeName=pk,AttributeType=S AttributeName=sk,AttributeType=S --key-schema AttributeName=pk,KeyType=HASH AttributeName=sk,KeyType=RANGE
dynamodb-admin:
image: aaronshaf/dynamodb-admin
ports:
- '8001:8001'
environment:
DYNAMO_ENDPOINT: http://dynamodb-local:8000
TABLE_MOVIES: thepixardb_movies
AWS_PROFILE: default
AWS_REGION: sa-east-1
volumes:
- ~/.aws/:/root/.aws:ro
depends_on:
- dynamodb-local
database:
image: thepixardb/database
build:
context: .
target: database
dockerfile: Dockerfile
restart: unless-stopped
environment:
DYNAMO_ENDPOINT: http://dynamodb-local:8000
TABLE_MOVIES: thepixardb_movies
AWS_PROFILE: default
AWS_REGION: sa-east-1
volumes:
- ~/.aws/:/root/.aws:ro
depends_on:
dynamoInit:
condition: service_started
ports:
- '3000:3000'
command: yarn dev
api:
image: thepixardb/api
build:
context: .
target: api
dockerfile: Dockerfile
restart: unless-stopped
env_file: .env
environment:
HTTP_PORT: 8080
HTTP_ADDRESS: 0.0.0.0
DYNAMO_ENDPOINT: http://dynamodb-local:8000
TABLE_MOVIES: thepixardb_movies
AWS_PROFILE: default
AWS_REGION: sa-east-1
ports:
- '8080:8080'
volumes:
- .:/usr/src/app
- ~/.aws/:/root/.aws:ro
depends_on:
database:
condition: service_started
dynamoInit:
condition: service_started
command: yarn dev