This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
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
e0bd1f4
commit 8078db9
Showing
3 changed files
with
34 additions
and
1 deletion.
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,5 @@ | ||
Dockerfile | ||
.dockerignore | ||
node_modules | ||
npm-debug.log | ||
dist |
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,28 @@ | ||
ARG NODE_ENV=production | ||
ARG NODE_VERSION=22 | ||
|
||
# Base image | ||
FROM node:${NODE_VERSION} | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
# A wildcard is used to ensure both package.json AND package-lock.json are copied | ||
COPY package*.json ./ | ||
|
||
# Install app dependencies | ||
RUN npm ci --ignore-scripts | ||
|
||
# Bundle app source | ||
COPY . . | ||
|
||
# Prisma | ||
RUN npx prisma generate | ||
|
||
# Creates a "dist" folder with the production build | ||
RUN npm run build | ||
|
||
EXPOSE 3000 | ||
|
||
# Start the server using the production build | ||
CMD [ "node", "dist/main.js" ] |
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,4 +1,4 @@ | ||
{ | ||
"schemaVersion": 2, | ||
"templateId": "node/22.8" | ||
"dockerfilePath": "./Dockerfile" | ||
} |