-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from torusresearch/feat/optimize-backend
Feat/optimize backend
- Loading branch information
Showing
10 changed files
with
543 additions
and
631 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
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 was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# for build | ||
FROM node:20-alpine AS build | ||
|
||
ENV NODE_OPTIONS --max-old-space-size=4096 | ||
|
||
WORKDIR /app | ||
|
||
RUN apk add --no-cache --virtual .gyp \ | ||
python3 \ | ||
make \ | ||
g++ | ||
|
||
COPY package.json ./ | ||
|
||
RUN npm i | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
# for production | ||
FROM node:20-alpine | ||
|
||
ENV NODE_OPTIONS --max-old-space-size=4096 | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /app/package*.json ./ | ||
|
||
RUN npm ci --omit=dev --ignore-scripts | ||
|
||
COPY --from=build /app/dist ./dist | ||
|
||
CMD npm run prod |
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
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