mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-02 13:23:09 +02:00
make it closer to Misskey's
This commit is contained in:
parent
da6dedc508
commit
70efa1454b
1 changed files with 25 additions and 26 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,8 +1,8 @@
|
||||||
# syntax=docker/dockerfile:1.4
|
# syntax = docker/dockerfile:1.4
|
||||||
|
|
||||||
ARG NODE_VERSION=20.11.1-bullseye
|
ARG NODE_VERSION=20.11.1-bullseye
|
||||||
|
|
||||||
# Build assets and compile TypeScript
|
# build assets & compile TypeScript
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS native-builder
|
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS native-builder
|
||||||
|
|
||||||
|
@ -31,15 +31,15 @@ COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bu
|
||||||
ARG NODE_ENV=production
|
ARG NODE_ENV=production
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||||
pnpm install --aggregate-output --frozen-lockfile
|
pnpm i --frozen-lockfile --aggregate-output
|
||||||
|
|
||||||
COPY --link . ./
|
COPY --link . ./
|
||||||
|
|
||||||
RUN git submodule update --init
|
RUN git submodule update --init
|
||||||
RUN pnpm run build
|
RUN pnpm build
|
||||||
RUN rm -rf .git/
|
RUN rm -rf .git/
|
||||||
|
|
||||||
# Build native dependencies for the target platform
|
# build native dependencies for target platform
|
||||||
|
|
||||||
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION} AS target-builder
|
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION} AS target-builder
|
||||||
|
|
||||||
|
@ -62,12 +62,12 @@ COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bu
|
||||||
ARG NODE_ENV=production
|
ARG NODE_ENV=production
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
||||||
pnpm install --aggregate-output --frozen-lockfile
|
pnpm i --frozen-lockfile --aggregate-output
|
||||||
|
|
||||||
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
|
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
|
||||||
|
|
||||||
ARG GID="991"
|
|
||||||
ARG UID="991"
|
ARG UID="991"
|
||||||
|
ARG GID="991"
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
@ -102,7 +102,6 @@ COPY --chown=sharkey:sharkey . ./
|
||||||
|
|
||||||
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
|
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
HEALTHCHECK --interval=5s --retries=20 CMD ["/bin/bash", "/sharkey/healthcheck.sh"]
|
HEALTHCHECK --interval=5s --retries=20 CMD ["/bin/bash", "/sharkey/healthcheck.sh"]
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||||
CMD ["pnpm", "run", "migrateandstart"]
|
CMD ["pnpm", "run", "migrateandstart"]
|
||||||
|
|
Loading…
Reference in a new issue