Skip to content

Commit

Permalink
Merge pull request #17 from IV1201-Group-2/feature/docker
Browse files Browse the repository at this point in the history
Add Dockerfile for building client
  • Loading branch information
hannesmann authored Feb 15, 2024
2 parents c319d62 + b40f273 commit abd0f59
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:lts-alpine as clientstage
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build

FROM openjdk:17 as servicestage
WORKDIR /service

COPY service/mvnw .
COPY service/.mvn .mvn
COPY service/pom.xml .
COPY service/src src
COPY --from=clientstage /app/dist src/main/resources/static

RUN ./mvnw package

FROM openjdk:17
COPY --from=servicestage /service/target/client-service-0.0.1-SNAPSHOT.jar /app.jar
CMD java -Dserver.port=$PORT -jar /app.jar
1 change: 0 additions & 1 deletion service/Procfile

This file was deleted.

Empty file modified service/mvnw
100644 → 100755
Empty file.

0 comments on commit abd0f59

Please sign in to comment.