Skip to content

Instantly share code, notes, and snippets.

@QualityMeasurement
Forked from zxexz/Dockerfile-eCRNow
Created August 24, 2021 01:26
Show Gist options
  • Select an option

  • Save QualityMeasurement/33ed5d79437328a834b3c4280d087c67 to your computer and use it in GitHub Desktop.

Select an option

Save QualityMeasurement/33ed5d79437328a834b3c4280d087c67 to your computer and use it in GitHub Desktop.
eCR Now Docker

eCR Now docker-compose and Dockerfile for testing

As is, this Dockerfile expects the application.properties file, schematron file, and ersd file to be located in the subdirectory eCRFiles/.

The format for the ersd file is expected to be xml, if you are using the json version, comment out sed RUN layer and rename the instances of the string latest-bundle.xml in the dockerfile to your json file.

If you need to make changes you can just exec into the container (install vim or something too), do a docker cp or just build the image by hand from the base maven image but with a volume attached to /root/.m2 for the maven cache.

version: '3.2'
services:
db:
image: postgres:12
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ecrexample
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- type: bind
source: ./db/pgdata
target: /var/lib/postgresql/data/pgdata
# ports:
# - "5434:5432"
networks:
- ecrnow_network
ecrnow:
image: ecrnow:latest
build:
dockerfile: Dockerfile-eCRNow
context: ./
ports:
- "8081:8081"
networks:
- ecrnow_network
networks:
ecrnow_network:
FROM maven:3.6.3-jdk-8
RUN apt update \
&& apt install -y git \
&& curl -sL https://deb.nodesource.com/setup_12.x | bash \
&& apt install -y nodejs
RUN git clone https://github.com/drajer-health/eCRNow.git
WORKDIR eCRNow/
COPY eCRFiles/application.properties src/main/resources/application.properties
COPY eCRFiles/config.js frontend/public/config.js
RUN sed -i s/newJsonParser/newXmlParser/g src/main/java/com/drajer/ecrapp/config/SpringConfiguration.java
RUN mvn clean install -DskipTests
COPY eCRFiles/CDAR2_IG_PHCASERPT_R2_STU1.1_SCHEMATRON.sch /data/CDAR2_IG_PHCASERPT_R2_STU1.1_SCHEMATRON.sch
COPY eCRFiles/latest-bundle.xml /data/latest-bundle.xml
ENTRYPOINT java -jar ./target/ecr-now.war
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment