From e9a692a54c9d3dcfc3eb3e40a21b0c791d908d72 Mon Sep 17 00:00:00 2001 From: Sean Finan Date: Wed, 10 May 2023 07:40:15 -0400 Subject: [PATCH] Update for 0.4.0 --- README.md | 8 ++++---- docker-compose.yml | 6 +++--- dphe-stream/Dockerfile | 20 ++++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 343634d..31143ea 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ ## Changes needed to make a release -- 1: Place the source code zip file, for instance `v0.3.0-cr-release.zip`, to the directory `dphe-stream`. And this zip file will be used to build the `dphe-stream` docker image. -- 2: Edit the `dphe-stream/Dockerfile` and specify to use the target release version, for instance `0.3.0`. +- 1: Place the source code zip file, for instance `v0.4.0-cr-release.zip`, to the directory `dphe-stream`. And this zip file will be used to build the `dphe-stream` docker image. +- 2: Edit the `dphe-stream/Dockerfile` and specify to use the target release version, for instance `0.4.0`. ## Overview of components and architecture @@ -76,8 +76,8 @@ docker scan --login Once logged in, you can run the scans as follows: ``` -docker scan --dependency-tree --file ./dphe-stream/Dockerfile dphe-stream:0.3.0-cr -docker scan --dependency-tree --file ./dphe-stream-nginx/Dockerfile dphe-stream-nginx:0.3.0-cr +docker scan --dependency-tree --file ./dphe-stream/Dockerfile dphe-stream:0.4.0-cr +docker scan --dependency-tree --file ./dphe-stream-nginx/Dockerfile dphe-stream-nginx:0.4.0-cr ``` ## Start up services diff --git a/docker-compose.yml b/docker-compose.yml index 31142f9..a5d1bf8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: ./dphe-stream # Build the image with name and tag - image: dphe-stream:0.3.0-cr + image: dphe-stream:0.4.0-cr hostname: dphe-stream container_name: dphe-stream init: true @@ -19,14 +19,14 @@ services: - "8181:8080" volumes: # Make log accessible on host - - "./dphe-stream/logs:/usr/src/app/v0.3.0-cr-release/dphe-stream-rest/logs" + - "./dphe-stream/logs:/usr/src/app/v0.4.0-cr-release/dphe-stream-rest/logs" networks: - dphe-stream-network dphe-stream-nginx: build: ./dphe-stream-nginx # Build the image with name and tag - image: dphe-stream-nginx:0.3.0-cr + image: dphe-stream-nginx:0.4.0-cr hostname: dphe-stream-nginx container_name: dphe-stream-nginx init: true diff --git a/dphe-stream/Dockerfile b/dphe-stream/Dockerfile index ed607eb..45ccaad 100644 --- a/dphe-stream/Dockerfile +++ b/dphe-stream/Dockerfile @@ -20,7 +20,7 @@ RUN yum update -y && \ curl -fsSL https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share && \ mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven && \ ln -s /usr/share/maven/bin/mvn /usr/bin/mvn && \ - unzip v0.3.0-cr-release.zip && \ + unzip v0.4.0-cr-release.zip && \ yum clean all # Set environment variables for Java and Maven @@ -31,14 +31,14 @@ ENV M2 $M2_HOME/bin ENV PATH $M2:$PATH # Install local dependencies -RUN mvn -f /usr/src/app/v0.3.0-cr-release/dphe-onto-db/pom.xml clean install -DskipTests && \ - mvn -f /usr/src/app/v0.3.0-cr-release/dphe-neo4j/pom.xml clean install -DskipTests && \ - mvn -f /usr/src/app/v0.3.0-cr-release/dphe-core/pom.xml clean install -DskipTests && \ - mvn -f /usr/src/app/v0.3.0-cr-release/dphe-stream/pom.xml clean install -DskipTests && \ - mvn -f /usr/src/app/v0.3.0-cr-release/dphe-stream-rest/pom.xml clean install -DskipTests +RUN mvn -f /usr/src/app/v0.4.0-cr-release/dphe-onto-db/pom.xml clean install -DskipTests && \ + mvn -f /usr/src/app/v0.4.0-cr-release/dphe-neo4j/pom.xml clean install -DskipTests && \ + mvn -f /usr/src/app/v0.4.0-cr-release/dphe-core/pom.xml clean install -DskipTests && \ + mvn -f /usr/src/app/v0.4.0-cr-release/dphe-stream/pom.xml clean install -DskipTests && \ + mvn -f /usr/src/app/v0.4.0-cr-release/dphe-stream-rest/pom.xml clean install -DskipTests # Change directory to build the REST API application jar -WORKDIR /usr/src/app/v0.3.0-cr-release/dphe-stream-rest +WORKDIR /usr/src/app/v0.4.0-cr-release/dphe-stream-rest # Remove the default application.properties # Remove the default deepphe.properties @@ -69,6 +69,6 @@ ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] EXPOSE 8080 # Start the rest api server on port 8080 running as non-root -# Note: since the current work dir is /usr/src/app/v0.3.0-cr-release/dphe-stream-rest, the logs will be generated here too -# Thus we use /usr/src/app/v0.3.0-cr-release/dphe-stream-rest/logs for the volume mount in docker-compose.yml -CMD ["java", "-jar","-Xmx6G","/usr/src/app/v0.3.0-cr-release/dphe-stream-rest/target/deepphe-stream-rest-0.5.0.jar"] +# Note: since the current work dir is /usr/src/app/v0.4.0-cr-release/dphe-stream-rest, the logs will be generated here too +# Thus we use /usr/src/app/v0.4.0-cr-release/dphe-stream-rest/logs for the volume mount in docker-compose.yml +CMD ["java", "-jar","-Xmx6G","/usr/src/app/v0.4.0-cr-release/dphe-stream-rest/target/deepphe-stream-rest.jar"]