2023-10-29 12:08:01 +01:00
|
|
|
FROM node:21 as fronted
|
|
|
|
COPY --chown=node:node . /home/node/src
|
|
|
|
WORKDIR /home/node/src/app
|
2023-10-29 12:01:50 +01:00
|
|
|
RUN npm install && npm run build
|
|
|
|
|
2023-09-18 20:54:35 +02:00
|
|
|
FROM gradle:7-jdk11 AS build
|
2023-10-29 12:08:01 +01:00
|
|
|
COPY --from=fronted --chown=gradle:gradle /home/node/src /home/gradle/src
|
2023-09-18 20:54:35 +02:00
|
|
|
WORKDIR /home/gradle/src
|
|
|
|
RUN gradle buildFatJar --no-daemon
|
|
|
|
|
|
|
|
FROM openjdk:11
|
|
|
|
EXPOSE 3002
|
|
|
|
RUN mkdir /app
|
2023-09-19 21:39:27 +02:00
|
|
|
COPY --from=build /home/gradle/src/.env /home/gradle/src/*.json /home/gradle/src/build/libs/*.jar /app/
|
2023-09-18 20:54:35 +02:00
|
|
|
|
|
|
|
ENV PORT=3002
|
|
|
|
ENTRYPOINT ["java","-jar","/app/schools-all.jar"]
|