-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
1,852 additions
and
5,232 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,26 +1,30 @@ | ||
FROM node:18-alpine | ||
FROM node:20-alpine as base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
WORKDIR /katlyn-dev | ||
|
||
FROM base as build | ||
|
||
# Install packages | ||
COPY package*.json tsconfig.json ./ | ||
RUN npm ci | ||
COPY package.json pnpm-lock.yaml tsconfig.json ./ | ||
RUN pnpm i --frozen-lockfile | ||
|
||
# Compile typescript | ||
COPY ./src ./src | ||
RUN npm run build | ||
|
||
|
||
FROM node:18-alpine | ||
FROM base | ||
EXPOSE 80 | ||
WORKDIR /katlyn-dev | ||
|
||
# Install packages | ||
COPY package*.json tsconfig.json ./ | ||
RUN npm ci --production | ||
COPY package.json pnpm-lock.yaml tsconfig.json ./ | ||
RUN pnpm i --frozen-lockfile --prod | ||
|
||
# Copy over finalized files | ||
COPY ./public ./public | ||
COPY ./views ./views | ||
COPY --from=0 /katlyn-dev/dist /katlyn-dev/dist | ||
COPY --from=build /katlyn-dev/dist /katlyn-dev/dist | ||
|
||
CMD [ "npm", "start" ] | ||
CMD [ "pnpm", "start" ] |
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,15 +1,15 @@ | ||
FROM node:18-alpine | ||
EXPOSE 80 | ||
WORKDIR /katlyn-dev | ||
|
||
# Install packages | ||
COPY package*.json tsconfig.json ./ | ||
RUN npm ci | ||
RUN pnpm i --frozen-lockfile | ||
|
||
# Compile typescript | ||
COPY ./public ./public | ||
COPY ./views ./views | ||
COPY ./src ./src | ||
RUN npm run build | ||
|
||
CMD [ "npm", "run", "start:dev" ] | ||
CMD [ "pnpm", "run", "start:dev" ] |
Oops, something went wrong.