generated from idea2app/Next-Bootstrap-ts
-
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.
[refactor] replace Authing Guard with LeanCloud SMS based Back-end API
[add] Captcha & SMS Code components [migrate] replace GitHub repository types & model with MobX-GitHub [migrate] upgrade to ES Decorator stage-3, Node.js 20, PNPM 9, Next.js 15, ESLint 9, Husky 9 & ohter latest Upstream packages/actions [optimize] i18n imports & Model folder structure [optimize] RAM & Disk size of Docker image
- Loading branch information
Showing
51 changed files
with
6,103 additions
and
4,489 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,6 +1,6 @@ | ||
README.md | ||
node_modules/ | ||
.eslintrc.json | ||
eslint.config.mjs | ||
.next/ | ||
.vercel/ | ||
start.sh | ||
|
This file was deleted.
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
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,5 +1 @@ | ||
#!/bin/sh | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm test |
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,5 +1 @@ | ||
#!/bin/sh | ||
|
||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run build |
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,23 +1,28 @@ | ||
# Reference: https://pnpm.io/docker#example-1-build-a-bundle-in-a-docker-container | ||
|
||
FROM node:18-slim AS base | ||
FROM node:20-slim AS base | ||
RUN apt-get update && \ | ||
apt-get install curl -y --no-install-recommends | ||
apt-get install ca-certificates curl libjemalloc-dev -y --no-install-recommends && \ | ||
rm -rf /var/lib/apt/lists/* | ||
# set environment variable to preload JEMalloc | ||
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so.2" | ||
# set GC time, set arenas number, set background_thread run GC | ||
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
COPY . /app | ||
WORKDIR /app | ||
|
||
FROM base AS prod-deps | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --prod --frozen-lockfile | ||
|
||
FROM base AS build | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile | ||
RUN pnpm build | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile | ||
RUN CI=true pnpm build | ||
|
||
FROM base | ||
COPY --from=prod-deps /app/node_modules /app/node_modules | ||
COPY --from=build /app/dist /app/dist | ||
COPY --from=build /app/public ./public | ||
COPY --from=build /app/.next/static ./.next/static | ||
COPY --from=build /app/.next/standalone ./ | ||
EXPOSE 3000 | ||
CMD ["npm", "start"] | ||
ENV PORT=3000 | ||
ENV HOSTNAME="0.0.0.0" | ||
CMD ["node", "server.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
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 @@ | ||
module.exports = { | ||
presets: [ | ||
// https://babeljs.io/docs/babel-preset-react | ||
[ | ||
'@babel/preset-react', | ||
{ | ||
runtime: 'automatic', | ||
development: process.env.BABEL_ENV === 'development', | ||
}, | ||
], | ||
], | ||
plugins: [ | ||
// https://github.com/babel/babel/issues/16262#issuecomment-1962832499 | ||
[ | ||
'@babel/plugin-transform-typescript', | ||
{ | ||
allowDeclareFields: true, | ||
allowNamespaces: true, | ||
allExtensions: true, | ||
isTSX: true, | ||
}, | ||
], | ||
// https://babeljs.io/docs/babel-plugin-proposal-decorators#note-compatibility-with-babelplugin-transform-class-properties | ||
['@babel/plugin-proposal-decorators', { version: '2023-05' }], | ||
], | ||
}; |
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
Oops, something went wrong.
a8dea21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for idea-mall ready!
✅ Preview
https://idea-mall-p5wo0t07x-techquerys-projects.vercel.app
Built with commit a8dea21.
This pull request is being automatically deployed with vercel-action