-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile
26 lines (17 loc) · 633 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM node:19.9.0-alpine3.17 as frontend
WORKDIR /
COPY frontend/package*.json ./app/
RUN npm --legacy-peer-deps --prefix app install
COPY frontend app
RUN npm run --prefix app build --prod
FROM maven:3.6.0-jdk-8-slim AS build
WORKDIR /
COPY backend/src /home/app/src
COPY backend/pom.xml /home/app
COPY --from=frontend backend/src/main/resources/static /home/app/src/main/resources/static
RUN mvn -f /home/app/pom.xml clean package
FROM openjdk:8-jre-slim
COPY --from=build /home/app/target/backend.jar /usr/local/lib/backend.jar
# COPY .env .env
EXPOSE 1337
ENTRYPOINT ["java","-jar","/usr/local/lib/backend.jar", "start"]