From 2dad5750424370c0012e212c38a222d989f3b1be Mon Sep 17 00:00:00 2001 From: ale Date: Fri, 8 Nov 2024 15:11:56 +0100 Subject: [PATCH] initial commit --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3a3c78f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22-bookworm-slim as build +RUN apt update && apt install -y git && apt clean +RUN git clone -n --depth=1 --filter=tree:0 https://github.com/misskey-dev/misskey && \ + cd misskey && \ + git sparse-checkout set --no-cone packages/backend packages/misskey-js packages/misskey-reversi packages/meta.json .config/ && \ + git checkout +RUN cd /misskey/packages/misskey-reversi && yarn --dev && yarn build && \ + cd ../misskey-js && yarn --dev && yarn build && \ + cd ../backend && yarn add ../misskey-reversi ../misskey-js && yarn build + +FROM node:22-bookworm-slim +COPY --from=build --chown=node:node /misskey/.config /.config +COPY --from=build --chown=node:node /misskey/packages/meta.json /built/meta.json +COPY --from=build --chown=node:node /misskey/packages/backend /fedired/backend +USER node +RUN cp /.config/example.yml /.config/default.yml +WORKDIR /fedired/backend +ENTRYPOINT ["yarn", "start"]