forked from metriport/metriport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
91 lines (88 loc) · 3.03 KB
/
docker-compose.dev.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
85
86
87
88
89
90
91
version: "3.8"
name: app
networks:
metriportNetwork:
name: metriportNetwork
driver: bridge
services:
# These are the configurations for our Node app
# When Docker Compose starts this container it will automatically
# use the Dockerfile in the directory to configure it
app:
build:
context: ../../
dockerfile: packages/api/Dockerfile.dev
deploy:
restart_policy:
condition: on-failure
depends_on:
# Our app does not work without our database
# so this ensures our database is loaded first
postgres:
condition: service_healthy
environment:
- DB_CREDS={"password":"admin","dbname":"db","engine":"postgres","port":5432,"host":"postgres","username":"admin"}
- NODE_ENV=development
- ENV_TYPE=dev
- TOKEN_TABLE_NAME=token
- DYNAMODB_ENDPOINT=http://dynamodb:8000
- FHIR_SERVER_URL=http://host.docker.internal:8888
- FHIR_CONVERTER_SERVER_URL=http://host.docker.internal:8777
- MEDICAL_DOCUMENTS_BUCKET_NAME=medical-documents-staging
- MEDICAL_DOCUMENTS_UPLOADS_BUCKET_NAME=metriport-medical-document-uploads-staging
- LOCAL_ACCOUNT_CXID=cdb678ab-07e3-42c5-93f5-5541cf1f15a8
networks:
- metriportNetwork
ports:
- "8080:8080"
- "9229:9229"
volumes:
- ./src:/usr/src/app/packages/api/src
- ../core/dist:/usr/src/app/packages/core/dist
- ../api-sdk/dist:/usr/src/app/packages/api-sdk/dist
- ../commonwell-sdk/dist:/usr/src/app/packages/commonwell-sdk/dist
- ../carequality-sdk/dist:/usr/src/app/packages/carequality-sdk/dist
- ../ihe-gateway-sdk/dist:/usr/src/app/packages/ihe-gateway-sdk/dist
- ../shared/dist:/usr/src/app/packages/shared/dist
extra_hosts:
- "host.docker.internal:host-gateway"
# Config for dynamoDB table for auth token management
# To access admin GUI:
# npm install -g dynamodb-admin
# DYNAMO_ENDPOINT=http://localhost:8000 dynamodb-admin
dynamodb:
image: amazon/dynamodb-local
container_name: dynamodb
hostname: dynamodb
restart: always
ports:
- 8000:8000
networks:
- metriportNetwork
command: "-jar DynamoDBLocal.jar -sharedDb"
# This is the configuration for our PostgreSQL database container
# Note the `postgres` name is important, in our Node app when we refer
# to `host: "postgres"` that value is mapped on the network to the
# address of this container.
postgres:
image: postgres:14.4-alpine
restart: always
command: -c 'max_connections=350'
environment:
# You can set the value of environment variables
# in your docker-compose.yml file
# Our Node app will use these to connect
# to the database
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=db
ports:
# Standard port for PostgreSQL databases
- "5432:5432"
networks:
- metriportNetwork
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 2s
timeout: 2s
retries: 2