Skip to content

Commit

Permalink
Update for 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
seanfinan committed May 10, 2023
1 parent e2e397c commit e9a692a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
20 changes: 10 additions & 10 deletions dphe-stream/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"]

0 comments on commit e9a692a

Please sign in to comment.