-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
41 lines (37 loc) · 1.36 KB
/
Dockerfile
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
# ------ Integration Test Server Image ------
FROM 232196027141.dkr.ecr.us-east-1.amazonaws.com/kf-strides-smile-cdr:2021.02.R05 as test
WORKDIR /home/smile/smilecdr
COPY server/settings/master.properties classes/cdr-config-Master.properties
COPY server/settings/logback.xml classes/logback.xml
COPY server/settings/jvm.sh bin/setenv
# JVM max memory - 2GB
ENV JVM_MAX_HEAP_SIZE -Xmx2048m
# Pretty print JSON
ENV FHIR_PRETTY_PRINT true
# Do not store full HTTP bodies in transaction db
ENV PERSIST_TRANSACTION_BODIES false
# Respect forwarded headers doesn't matter in test
ENV RESPECT_FWD_HEADERS false
# Load the full base FHIR model during server init
ENV SEED_CONF_RESOURCES true
# Validate resources against FHIR spec AND base profiles
ENV REQUEST_VALIDATION true
# Use in memory database
ENV DB_DRIVER H2_EMBEDDED
ENV DB_CONN_URL jdbc:h2:file:./database/cdr
ENV DB_USERNAME admin
ENV DB_PASSWORD password
# ------ Production Server Image ------
FROM test as production
RUN apt update
# JVM max memory - 8GB
ENV JVM_MAX_HEAP_SIZE -Xmx8g
# Pretty print JSON
ENV FHIR_PRETTY_PRINT false
# Respect forwarded headers from load balancer
ENV RESPECT_FWD_HEADERS true
# Use external Postgres database
ENV DB_DRIVER POSTGRES_9_4
ENV DB_CONN_URL jdbc:postgresql://localhost:5432/postgres
# NOTE - The following get overwritten by values in S3 secrets file
# DB_CONN_URL, DB_USERNAME, DB_PASSWORD