mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Update Dockerfile
This commit is contained in:
+23
-11
@@ -1,23 +1,35 @@
|
|||||||
FROM debian
|
FROM debian AS build
|
||||||
|
|
||||||
RUN mkdir -p /home/node/app/node_modules
|
|
||||||
WORKDIR /home/node/app
|
WORKDIR /home/node/app
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY . .
|
||||||
COPY prisma ./prisma/
|
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive
|
RUN DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update -y
|
RUN apt-get update -y
|
||||||
RUN apt-get -y install curl gnupg git python2 make g++ iputils-ping ffmpeg
|
RUN apt-get -y install curl gnupg git python2 make g++ iputils-ping ffmpeg
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
|
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
|
||||||
RUN apt-get -y install nodejs
|
RUN apt-get -y install nodejs
|
||||||
|
|
||||||
RUN npm i -g yarn
|
RUN npm i -g yarn
|
||||||
|
|
||||||
RUN yarn
|
RUN yarn
|
||||||
RUN yarn prisma generate
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
CMD [ "yarn", "start"]
|
|
||||||
|
FROM debian
|
||||||
|
WORKDIR /home/node/app
|
||||||
|
|
||||||
|
RUN apt-get update -y
|
||||||
|
RUN apt-get -y install curl gnupg git python2 make g++ iputils-ping ffmpeg
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
|
||||||
|
RUN apt-get -y install nodejs
|
||||||
|
RUN npm i -g yarn
|
||||||
|
|
||||||
|
COPY --from=build /home/node/app/package.json .
|
||||||
|
COPY --from=build /home/node/app/yarn.lock .
|
||||||
|
|
||||||
|
RUN yarn
|
||||||
|
|
||||||
|
COPY --from=build /home/node/app/prisma ./prisma/
|
||||||
|
RUN yarn prisma generate
|
||||||
|
|
||||||
|
COPY --from=build /home/node/app/build .
|
||||||
|
|
||||||
|
CMD [ "node", "index.js"]
|
||||||
Reference in New Issue
Block a user