From c73269e93829c81ad61fbddaecdeecf26234b4a7 Mon Sep 17 00:00:00 2001 From: Tim McIver Date: Tue, 2 Nov 2021 22:34:46 -0400 Subject: [PATCH 1/3] Removing clone of repository in Dockerfile as there is no need for it. --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4257c5..2d2c43b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,11 @@ ARG LODE_EXTERNAL_URL ARG WEBVOWL_EXTERNAL_URL ARG USE_HTTPS -RUN cd /opt && \ - git clone https://github.com/essepuntato/LODE.git - -RUN echo "externalURL=${LODE_EXTERNAL_URL}\nwebvowl=${WEBVOWL_EXTERNAL_URL}\nuseHTTPs=${USE_HTTPS}" > /opt/LODE/src/main/webapp/config.properties +WORKDIR /opt/LODE -#RUN cat /opt/LODE/src/main/webapp/config.propexxwties +COPY . . -WORKDIR /opt/LODE +RUN echo "externalURL=${LODE_EXTERNAL_URL}\nwebvowl=${WEBVOWL_EXTERNAL_URL}\nuseHTTPs=${USE_HTTPS}" > /opt/LODE/src/main/webapp/config.properties EXPOSE 8080 From e0073d7ec44bf02fa80dc0c4dd480d689701d64b Mon Sep 17 00:00:00 2001 From: Tim McIver Date: Thu, 4 Nov 2021 23:25:50 -0400 Subject: [PATCH 2/3] Use multi-stage Docker build. This did not decrease the image size but does decrease the app start-up time since it is pre-compiled. --- Dockerfile | 15 ++++++++------- pom.xml | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2d2c43b..2054a9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ -FROM maven:3.6.3-jdk-8 +FROM maven:3.6.3-jdk-8 as build -ARG LODE_EXTERNAL_URL -ARG WEBVOWL_EXTERNAL_URL -ARG USE_HTTPS +ARG LODE_EXTERNAL_URL=true +ARG WEBVOWL_EXTERNAL_URL=true +ARG USE_HTTPS=false WORKDIR /opt/LODE COPY . . - RUN echo "externalURL=${LODE_EXTERNAL_URL}\nwebvowl=${WEBVOWL_EXTERNAL_URL}\nuseHTTPs=${USE_HTTPS}" > /opt/LODE/src/main/webapp/config.properties +RUN mvn clean package -EXPOSE 8080 +FROM jetty +COPY --from=build /opt/LODE/target/LODE-1.3-SNAPSHOT.war /var/lib/jetty/webapps/lode.war -ENTRYPOINT ["mvn", "clean", "jetty:run"] +EXPOSE 80 diff --git a/pom.xml b/pom.xml index 9411f84..b7d52c3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,6 +5,7 @@ it.essepuntato LODE 1.3-SNAPSHOT + war UTF-8 @@ -119,6 +120,7 @@ org.mortbay.jetty jetty-maven-plugin + 11.0.7 src/main/resources/jetty/jetty.xml 9966 From 7638dce355a79300723be127c4dc34b30bab0684 Mon Sep 17 00:00:00 2001 From: Tim McIver Date: Fri, 5 Nov 2021 13:10:49 -0400 Subject: [PATCH 3/3] Update README.md. --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9c40f40..fc31646 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,21 @@ # Live OWL Documentation Environment (LODE) This repository is a Tomcat server application that can be used to create HTML documentation for [Web Ontology Language](https://www.w3.org/OWL/) (OWL) ontologies. +## Running -## Example usage: +You can run the application natively with: -1. Launch application: + mvn clean jetty:run + +You can also use Docker. Build an image with: - `mvn clean jetty:run` + docker build -t essepuntato/lode . + +Run a container with: -2. Test + docker run --rm -d -p 8080:8080 essepuntato/lode + +## Usage Try running LODE with the following ontologies: @@ -19,7 +26,6 @@ Try running LODE with the following ontologies: * it is a very tiny ontology visualised online using LODE at . * You can run try using a local instance of LODE to generate HTML for the local copy of PROMS and compare it with the online version made by the PROMS creator - ## Contacts **Silvio Peroni** *Creator*