mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 20:43:08 +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
13
Dockerfile
13
Dockerfile
|
@ -2,7 +2,7 @@
|
|||
|
||||
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
|
||||
|
||||
|
@ -31,15 +31,15 @@ COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bu
|
|||
ARG NODE_ENV=production
|
||||
|
||||
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 . ./
|
||||
|
||||
RUN git submodule update --init
|
||||
RUN pnpm run build
|
||||
RUN pnpm build
|
||||
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
|
||||
|
||||
|
@ -62,12 +62,12 @@ COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bu
|
|||
ARG NODE_ENV=production
|
||||
|
||||
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
|
||||
|
||||
ARG GID="991"
|
||||
ARG UID="991"
|
||||
ARG GID="991"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
|
@ -102,7 +102,6 @@ COPY --chown=sharkey:sharkey . ./
|
|||
|
||||
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
|
||||
ENV NODE_ENV=production
|
||||
|
||||
HEALTHCHECK --interval=5s --retries=20 CMD ["/bin/bash", "/sharkey/healthcheck.sh"]
|
||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||
CMD ["pnpm", "run", "migrateandstart"]
|
||||
|
|
Loading…
Reference in a new issue