-
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: Dockerfile + docker-compose + fix mobile sidebar close on c…
…lick
- Loading branch information
Showing
5 changed files
with
25 additions
and
37 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,35 +1,20 @@ | ||
FROM node:20-alpine AS base | ||
WORKDIR /usr/src/app | ||
RUN apk update && apk upgrade npm | ||
|
||
# Install dependencies | ||
FROM base as deps | ||
|
||
WORKDIR /app | ||
|
||
ADD package*.json . | ||
|
||
FROM base as install | ||
COPY package.json package-lock.json . | ||
RUN npm ci | ||
|
||
# Build the app | ||
FROM base as build | ||
|
||
FROM install AS prerelease | ||
ENV NODE_ENV=production | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=deps /app/node_modules /app/node_modules | ||
COPY --from=install /usr/src/app/node_modules node_modules | ||
ADD . . | ||
|
||
RUN npm run build | ||
|
||
# Production image | ||
FROM base | ||
|
||
FROM base AS release | ||
ENV NODE_ENV=production | ||
COPY --from=prerelease /usr/src/app . | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /app . | ||
|
||
EXPOSE 3000 | ||
|
||
EXPOSE 3000/tcp | ||
CMD ["npm", "run", "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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.