Skip to content

Commit

Permalink
local fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
girishbharambe committed Sep 2, 2024
1 parent 339ede1 commit 5357df5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM node:18-alpine AS frontend-builder
WORKDIR /app
COPY ./app/package.json ./app/package-lock.json ./
WORKDIR /frontend
COPY ./frontend/package.json ./frontend/package-lock.json ./
RUN npm install
COPY ./app .
COPY ./frontend .
RUN npm run build
FROM openjdk:17-slim AS backend-builder
WORKDIR /app
WORKDIR /
COPY ./pom.xml ./
COPY ./src ./src
RUN apt-get update && apt-get install -y maven && mvn dependency:go-offline -B
COPY --from=frontend-builder /app/build ./src/main/resources/static/
COPY --from=frontend-builder /frontend/public/dist ./src/main/resources/static/
RUN mvn clean package -DskipTests
FROM openjdk:17-slim
WORKDIR /app
COPY --from=backend-builder /app/target/example-extension-java-vue-0.0.1-SNAPSHOT.jar ./example-extension-java-vue-0.0.1-SNAPSHOT.jar
WORKDIR /
COPY --from=backend-builder target/example-extension-java-vue-0.0.1-SNAPSHOT.jar ./example-extension-java-vue-0.0.1-SNAPSHOT.jar
COPY src/main/resources/application-prod.yml ./application-prod.yml
ENV SPRING_PROFILES_ACTIVE=prod
EXPOSE 8080
CMD ["java", "-jar", "example-extension-java-vue-0.0.1-SNAPSHOT.jar"]
CMD ["java", "-jar", "example-extension-java-react-0.0.1-SNAPSHOT.jar"]
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/classes/static</outputDirectory>
<outputDirectory>src/main/resources/static</outputDirectory>
<resources>
<resource>
<directory>app/dist</directory>
<directory>frontend/public/dist</directory>
<filtering>true</filtering>
</resource>
</resources>
Expand Down

0 comments on commit 5357df5

Please sign in to comment.