Skip to content

Commit

Permalink
chore: move to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
katlyn committed Oct 9, 2023
1 parent 3c73261 commit 3b3b109
Show file tree
Hide file tree
Showing 4 changed files with 1,852 additions and 5,232 deletions.
22 changes: 13 additions & 9 deletions Dockerfile
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" ]
6 changes: 3 additions & 3 deletions development.Dockerfile
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" ]
Loading

0 comments on commit 3b3b109

Please sign in to comment.