chore: docker

This commit is contained in:
胡鑫 2023-05-16 22:18:37 +08:00
parent f286dcee78
commit 5ce0e7b182
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
FROM node:18-bullseye
FROM node:lts-alpine3.17
RUN mkdir -p /web
@ -6,15 +6,15 @@ COPY . /web
WORKDIR /web
RUN npm config set registry https://registry.npm.taobao.org
RUN npm install -g pnpm
RUN pnpm install
RUN pnpm build
# RUN yarn config set registry https://registry.npm.taobao.org
# RUN npm install -g yarn
RUN yarn
RUN yarn build
RUN rm -rf node_module
ENV HOST 0.0.0.0
ENV PORT 3000
EXPOSE 3000
CMD ["pnpm", "start"]
CMD ["yarn", "start"]

View File

@ -5,7 +5,7 @@
"build": "nuxi build",
"dev": "nuxi dev",
"dev:pwa": "VITE_PLUGIN_PWA=true nuxi dev",
"start": "pnpm build && node .output/server/index.mjs",
"start": "node .output/server/index.mjs",
"typecheck": "vue-tsc --noEmit",
"lint": "eslint .",
"postinstall": "nuxi prepare",