mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 10:49:20 +00:00
Update Dockerfile
This commit is contained in:
+23
-11
@@ -1,23 +1,35 @@
|
||||
FROM debian
|
||||
|
||||
RUN mkdir -p /home/node/app/node_modules
|
||||
FROM debian AS build
|
||||
WORKDIR /home/node/app
|
||||
|
||||
COPY package*.json ./
|
||||
COPY prisma ./prisma/
|
||||
|
||||
COPY . .
|
||||
RUN DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
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
|
||||
|
||||
RUN yarn
|
||||
RUN yarn prisma generate
|
||||
COPY . .
|
||||
|
||||
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