-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
41 lines (38 loc) · 903 Bytes
/
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
version: '3'
services:
# ---------- #
# HAPI #
# ---------- #
hapi_service:
container_name: web
image: node:alpine
environment:
- CONTAINER_NAME=web
- AWS_ACCESS_KEY_ID=DUMMYIDEXAMPLE
- AWS_SECRET_ACCESS_KEY=DUMMYEXAMPLEKEY
working_dir: /usr/src/app
volumes:
- ./src:/usr/src/app
ports:
- 80:3000
entrypoint: ["/bin/sh", "-c"]
command:
- |
node -v
npm init -y
npm i aws-sdk hapi
node server.js
# -------------- #
# DYNAMODB #
# -------------- #
dynamodb_service:
container_name: db
image: amazon/dynamodb-local:latest
environment:
- CONTAINER_NAME=db
ports:
- 8000:8000
working_dir: /home/dynamodblocal
volumes:
- ./db:/home/dynamodblocal/data
command: -jar DynamoDBLocal.jar -sharedDb -optimizeDbBeforeStartup -dbPath ./data