-
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
1 parent
0188620
commit 69b0a35
Showing
9 changed files
with
147 additions
and
79 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
sample.env | ||
.env | ||
README.md | ||
eslint.config.js | ||
.github | ||
docs | ||
node_modules | ||
tests |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ARG NODE_VERSION=20.16.0 | ||
|
||
FROM node:${NODE_VERSION}-alpine as builder | ||
WORKDIR /app | ||
|
||
# Download dependencies as a separate step to take advantage of Docker's caching. | ||
# Leverage a cache mount to /root/.npm to speed up subsequent builds. | ||
# Leverage a bind mounts to package.json and package-lock.json to avoid having to copy them into | ||
# into this layer. | ||
RUN --mount=type=bind,source=package.json,target=package.json \ | ||
--mount=type=bind,source=package-lock.json,target=package-lock.json \ | ||
--mount=type=cache,target=/root/.npm \ | ||
npm ci | ||
|
||
COPY . . | ||
|
||
FROM node:${NODE_VERSION}-alpine | ||
|
||
WORKDIR /app | ||
USER node | ||
|
||
COPY --from=builder /app . | ||
|
||
ARG PORT=4000 | ||
ENV PORT $PORT | ||
EXPOSE $PORT |
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
Oops, something went wrong.