chore: fix build command

This commit is contained in:
Damillora 2022-07-24 23:37:50 +07:00
parent 29955b4faa
commit 649bf4e207
2 changed files with 10 additions and 20 deletions

View File

@ -1,25 +1,15 @@
FROM node:14
FROM node:16-alpine
# install dependencies
WORKDIR /app
RUN npm install -g pnpm
COPY package.json pnpm-lock.yaml ./
COPY . .
RUN pnpm install
# Copy all local files into the image.
COPY . .
RUN yarn build
###
# Only copy over the Node pieces we need
# ~> Saves 35MB
###
FROM node:14-slim
RUN pnpm build
FROM node:16-alpine
WORKDIR /app
COPY --from=0 /app .
COPY . .
COPY --from=0 /app/build /app
COPY --from=0 /app/package.json /app
COPY --from=0 /app/node_modules /app/node_modules
EXPOSE 3000
CMD ["node", "./build"]
CMD ["node","./index.js"]

View File

@ -3,8 +3,8 @@
"version": "0.0.1",
"scripts": {
"dev": "vite dev",
"build": "svelte-kit build",
"preview": "svelte-kit preview",
"build": "vite build",
"preview": "vite preview",
"lint": "prettier --check . && eslint --ignore-path .gitignore .",
"format": "prettier --write ."
},