From c29c6790a14c5f6bb5e3b1f822489733add7c142 Mon Sep 17 00:00:00 2001 From: 7836246 Date: Sun, 3 Mar 2024 18:29:15 +0800 Subject: [PATCH] =?UTF-8?q?:triangular=5Fflag=5Fon=5Fpost:=20=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E8=AE=BE=E7=BD=AE=E5=8A=9F=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 1 + Dockerfile | 43 ++++++++++++++ README.md | 8 ++- components/common/LinkChange.vue | 53 +++++++++++++++++ components/tab/list.vue | 5 +- lang/en.ts | 26 ++++++++- lang/tw.ts | 26 +++++++++ lang/zh.ts | 26 +++++++++ pages/dns/[domain].html.vue | 4 +- pages/settings/index.vue | 98 ++++++++++++++++++++++++++++++++ pages/whois/[domain].html.vue | 3 +- stores/settings.ts | 28 +++++++++ 12 files changed, 313 insertions(+), 8 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 components/common/LinkChange.vue create mode 100644 stores/settings.ts diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5dedb9e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,43 @@ +FROM node:lts-alpine AS base + +# Set the working directory +WORKDIR /usr/src/app +# Install pnpm +RUN apk add --no-cache curl && \ + curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm + +################################################################################ +# Create a stage for installing dependencies +FROM base as dependencies +# Copy the package.json and package-lock.json (or pnpm-lock.yaml if available) +COPY package*.json pnpm-lock.yaml* ./ +# Install dependencies +RUN pnpm install --frozen-lockfile + +################################################################################ +# Create a stage for running the application in development mode +FROM dependencies as development +# Copy the source code +COPY . . +# Expose the port +EXPOSE 3000 +# Run the application +CMD ["pnpm", "run", "dev"] + +################################################################################ +# Create a stage for building the application +FROM dependencies as build +# Copy the source code +COPY . . +# Build the application +RUN pnpm run build +# Remove extraneous packages +RUN pnpm prune --prod + +################################################################################ +# Create a stage for running the application in production mode +FROM base AS production +# Copy the built application +COPY --from=build /usr/src/app/.output /usr/src/app/.output +# Run the application +CMD ["node", ".output/server/index.mjs"] diff --git a/README.md b/README.md index 57bf823..2dad627 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ yarn pnpm dev -# Nuxt-Whois -# Nuxt-Whois -# Nuxt-Whois + +``` + +# 免责声明 + 本项目开源仅供学习使用,不得用于任何违法用途,否则后果自负,与本人无关。使用请保留项目地址谢谢。 diff --git a/components/common/LinkChange.vue b/components/common/LinkChange.vue new file mode 100644 index 0000000..715fd78 --- /dev/null +++ b/components/common/LinkChange.vue @@ -0,0 +1,53 @@ + + + diff --git a/components/tab/list.vue b/components/tab/list.vue index 3c411f4..d5ab6be 100644 --- a/components/tab/list.vue +++ b/components/tab/list.vue @@ -1,5 +1,6 @@