mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 04:03:49 +01:00
Update 'Dockerfile'
This commit is contained in:
parent
98aae5a0ec
commit
345fd0688c
40
Dockerfile
40
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
|
ARG NODE_ENV=production
|
||||||
|
|
||||||
WORKDIR /misskey
|
WORKDIR /misskey
|
||||||
|
|
||||||
|
# Copy Files
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
RUN apt-get update
|
# Install Dependencies
|
||||||
RUN apt-get install -y build-essential
|
RUN apk update
|
||||||
RUN git submodule update --init
|
RUN apk add git ffmpeg tini alpine-sdk
|
||||||
|
|
||||||
|
# Configure corepack and yarn
|
||||||
|
RUN corepack enable
|
||||||
RUN yarn set version berry
|
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 install
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
|
# Remove git files
|
||||||
RUN rm -rf .git
|
RUN rm -rf .git
|
||||||
|
|
||||||
FROM node:16.15.1-bullseye-slim AS runner
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
||||||
|
CMD [ "yarn", "run", "migrateandstart" ]
|
||||||
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"]
|
|
Loading…
Reference in New Issue
Block a user