-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
339ede1
commit 5357df5
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters