From 7927c7cce445158be3544fab89e20138db1d2149 Mon Sep 17 00:00:00 2001 From: Hanna Date: Mon, 8 Aug 2022 05:32:59 +0200 Subject: [PATCH 1/2] Update 'Dockerfile' --- Dockerfile | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0863f6827..301e9d1b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,27 @@ -FROM node:16.15.1-bullseye AS builder - +FROM node:alpine +ENV YARN_CHECKSUM_BEHAVIOR=update ARG NODE_ENV=production - WORKDIR /misskey +# Copy Files COPY . ./ -RUN apt-get update -RUN apt-get install -y build-essential -RUN git submodule update --init +# Install Dependencies +RUN apk update +RUN apk add git ffmpeg tini alpine-sdk + +# Configure corepack and yarn +RUN corepack enable RUN yarn set version berry +RUN yarn plugin import workspace-tools + +# Install Dependencies +RUN yarn add @bull-board/api @bull-board/ui RUN yarn install RUN yarn build + +# Remove git files RUN rm -rf .git -FROM node:16.15.1-bullseye-slim AS runner - -WORKDIR /misskey - -RUN apt-get update -RUN apt-get install -y ffmpeg tini - -COPY --from=builder /misskey/node_modules ./node_modules -COPY --from=builder /misskey/built ./built -COPY --from=builder /misskey/packages/backend/node_modules ./packages/backend/node_modules -COPY --from=builder /misskey/packages/backend/built ./packages/backend/built -COPY --from=builder /misskey/packages/client/node_modules ./packages/client/node_modules -COPY . ./ - -ENV NODE_ENV=production -ENTRYPOINT ["/usr/bin/tini", "--"] -CMD ["npm", "run", "migrateandstart"] +ENTRYPOINT [ "/sbin/tini", "--" ] +CMD [ "yarn", "run", "migrateandstart" ] \ No newline at end of file From 44ad92f127b57d7b9a6b04c54e90472ba29df81b Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Mon, 8 Aug 2022 06:29:55 +0200 Subject: [PATCH 2/2] Mention dockerfile --- CALCKEY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CALCKEY.md b/CALCKEY.md index f22b73e48..e909cd060 100644 --- a/CALCKEY.md +++ b/CALCKEY.md @@ -32,6 +32,7 @@ ## Implemented - Yarn 3 + - Fix Dockerfile @hanna - Saner defaults - Star as default reaction - Recommended Instances timeline