-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
11 changed files
with
199 additions
and
59 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
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,21 +1,19 @@ | ||
FROM maven:3.9.6-amazoncorretto-21-debian AS build | ||
|
||
RUN apt-get update; apt-get install -y curl \ | ||
&& curl -sL https://deb.nodesource.com/setup_20.x | bash - \ | ||
&& apt-get install -y nodejs \ | ||
&& curl -L https://www.npmjs.com/install.sh | sh | ||
|
||
WORKDIR /app | ||
|
||
COPY pom.xml . | ||
COPY src ./src | ||
|
||
RUN mvn clean install -DskipTests | ||
|
||
FROM openjdk:21-jdk | ||
|
||
FROM openjdk:21-jdk AS dev | ||
WORKDIR /app | ||
|
||
COPY --from=build /app/target/*.jar bootstrapbugz-api.jar | ||
|
||
ENTRYPOINT ["java", "-Dspring.profiles.active=dev", "-jar", "bootstrapbugz-api.jar"] | ||
|
||
FROM openjdk:21-jdk AS prod | ||
WORKDIR /app | ||
COPY --from=build /app/target/*.jar bootstrapbugz-api.jar | ||
ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-jar", "bootstrapbugz-api.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
File renamed without changes.
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
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
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
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,17 +1,29 @@ | ||
FROM node:20-alpine | ||
|
||
RUN apk add --no-cache curl | ||
|
||
FROM node:22-alpine AS base | ||
WORKDIR /app | ||
|
||
ARG PUBLIC_APP_NAME | ||
ARG PUBLIC_API_URL | ||
ARG JWT_SECRET | ||
COPY package.json . | ||
COPY pnpm-lock.yaml . | ||
|
||
RUN npm install -g pnpm | ||
RUN pnpm install | ||
|
||
COPY . . | ||
|
||
FROM base AS dev | ||
RUN apk add --no-cache curl | ||
CMD ["pnpm", "run", "dev", "--host"] | ||
|
||
FROM base AS build | ||
RUN pnpm run build | ||
RUN pnpm prune --prod | ||
|
||
CMD ["pnpm", "run", "dev", "--host"] | ||
FROM node:22-alpine AS prod | ||
RUN apk add --no-cache curl | ||
WORKDIR /app | ||
# copy node_modules only if you have dependencies in package.json | ||
# if you only have devDependencies you can skip this line | ||
# COPY --from=build /app/node_modules node_modules/ | ||
COPY --from=build /app/build build/ | ||
COPY --from=build /app/package.json . | ||
ENV NODE_ENV=production | ||
CMD ["node", "build"] |
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
Oops, something went wrong.