-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: overhaul Dockerfile and docker-compose.yml
- Loading branch information
Showing
2 changed files
with
10 additions
and
7 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,17 +1,22 @@ | ||
FROM node:20.1.0-alpine AS base | ||
|
||
RUN apk add --update --no-cache openssl1.1-compat | ||
WORKDIR /app | ||
|
||
RUN npm install -g pnpm | ||
ENV NODE_ENV production | ||
|
||
WORKDIR /app | ||
RUN npm install -g [email protected] | ||
|
||
FROM base AS deps | ||
|
||
COPY package.json pnpm-lock.yaml ./ | ||
|
||
RUN pnpm install --frozen-lockfile --prod | ||
|
||
FROM base AS app | ||
|
||
COPY . . | ||
COPY --from=deps /app/node_modules ./node_modules | ||
|
||
ENV NODE_ENV production | ||
RUN pnpm ts:check | ||
|
||
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