-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/docs/ | ||
Dockerfile | ||
*.md | ||
.git | ||
/app/target/ | ||
/common/target/ | ||
/dhis/target/ | ||
/fhir/target/ | ||
/fhir-dstu3/target/ | ||
/fhir-r4/target/ | ||
/metadata-sheet/target/ | ||
/summary/target/ | ||
/.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM maven:3-openjdk-8-slim AS build | ||
WORKDIR /tmp/dhis2-fhir-adapter | ||
ARG DHIS2_HOME=/app | ||
|
||
COPY . /tmp/dhis2-fhir-adapter | ||
|
||
# create package | ||
RUN mvn clean package -DskipTests | ||
|
||
# create DHIS2_HOME/services/fhir-adapter configuration folder here https://github.com/opensrp/dhis2-fhir-adapter#configuration | ||
RUN mkdir -p ${DHIS2_HOME}/services/fhir-adapter \ | ||
&& cp /tmp/dhis2-fhir-adapter/app/target/dhis2-fhir-adapter.war ${DHIS2_HOME}/main.war | ||
|
||
FROM openjdk:8-jdk-slim AS deploy | ||
|
||
# specify the DHIS2_HOME environment variable | ||
ENV DHIS2_HOME=/app | ||
|
||
# create opensrp user | ||
ARG UID=10001 | ||
ARG GID=${UID} | ||
RUN groupadd -g ${GID} opensrp \ | ||
&& useradd -u ${UID} -g ${GID} opensrp | ||
|
||
COPY --chown=opensrp:opensrp --from=build ${DHIS2_HOME} ${DHIS2_HOME} | ||
|
||
USER opensrp | ||
|
||
WORKDIR ${DHIS2_HOME} | ||
|
||
CMD java -jar ${DHIS2_HOME}/main.war |