Skip to content

Commit

Permalink
Merge pull request #599 from bounswe/feature/BE-594-annotation-backen…
Browse files Browse the repository at this point in the history
…d-server-creation

Feature/be 594 annotation backend server creation
  • Loading branch information
volcaniqueo authored Dec 23, 2023
2 parents fd2a195 + 648c939 commit 27c0604
Show file tree
Hide file tree
Showing 22 changed files with 942 additions and 5 deletions.
17 changes: 17 additions & 0 deletions resq/backend/Dockerfile-anno.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM maven:3.6.3-openjdk-17 as stage1
WORKDIR /anno
COPY annotation/pom.xml .
# go-offline using the pom.xml
RUN mvn dependency:go-offline
# copy your other files
COPY ./annotation/src ./src
# compile the source code and package it in a jar file
RUN mvn clean install -Dmaven.test.skip=true

FROM openjdk:17-jdk
WORKDIR /anno
ARG JAR_FILE=/anno/target/annotation-0.0.1-SNAPSHOT.jar
COPY --from=stage1 ${JAR_FILE} ./anno/app.jar
COPY annotation/anno_env /anno/config
ENV anno.appdir=/anno/config
ENTRYPOINT ["java","-jar","./anno/app.jar"]
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM maven:3.6.3-openjdk-17 as stage1
WORKDIR /app
COPY pom.xml .
COPY resq/pom.xml .
# go-offline using the pom.xml
RUN mvn dependency:go-offline
# copy your other files
COPY ./src ./src
COPY ./resq/src ./src
# compile the source code and package it in a jar file
RUN mvn clean install -Dmaven.test.skip=true

FROM openjdk:17-jdk
WORKDIR /app
ARG JAR_FILE=/app/target/resq-0.0.1-SNAPSHOT.jar
COPY --from=stage1 ${JAR_FILE} ./app/app.jar
COPY project_env /app/config
COPY resq/project_env /app/config
ENV resq.appdir=/app/config
ENTRYPOINT ["java","-jar","./app/app.jar"]
37 changes: 37 additions & 0 deletions resq/backend/annotation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

anno_env_prod/
anno_env/

Binary file not shown.
2 changes: 2 additions & 0 deletions resq/backend/annotation/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
17 changes: 17 additions & 0 deletions resq/backend/annotation/Dockerfile.remote
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM maven:3.6.3-openjdk-17 as stage1
WORKDIR /anno
COPY ./pom.xml .
# go-offline using the pom.xml
RUN mvn dependency:go-offline
# copy your other files
COPY ./src ./src
# compile the source code and package it in a jar file
RUN mvn clean install -Dmaven.test.skip=true

FROM openjdk:17-jdk
WORKDIR /anno
ARG JAR_FILE=./anno/target/annotation-0.0.1-SNAPSHOT.jar
COPY --from=stage1 ${JAR_FILE} ./anno/app.jar
COPY ./anno_env_prod /anno/config
ENV anno.appdir=/anno/config
ENTRYPOINT ["java","-jar","./anno/app.jar"]
Loading

0 comments on commit 27c0604

Please sign in to comment.