blossom-cloudron/Dockerfile
Stixx a54bcbf38c
All checks were successful
Release to Gitea Container Registry / build_and_push (push) Successful in 7s
chore: fixing CloudronManifest
2024-11-05 12:11:36 +01:00

48 lines
1.3 KiB
Docker

FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4 AS base
RUN apt update && apt install -y --no-install-recommends \
liblmdb0 libflatbuffers1 libsecp256k1-0 libb2-1 libzstd1 \
&& rm -rf /var/lib/apt/lists/*
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /app
RUN wget https://github.com/hzrd149/blossom-server/archive/refs/heads/master.tar.gz
RUN tar -xvzf master.tar.gz
RUN mv blossom-server-master/* .
RUN rm -rf blossom-server-master
FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN --mount=type=cache,id=pnpm,target=/pnpm/store cd admin && pnpm install --frozen-lockfile
RUN pnpm build
RUN cd admin && pnpm build
FROM base AS main
COPY start.sh start.sh
COPY config.example.yml config.yml
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build ./app/build ./build
COPY --from=build ./app/admin/dist ./admin/dist
# Required by Cloudron
HEALTHCHECK CMD curl --fail http://localhost:3000 || exit 1
# Cloudron specific labels
LABEL cloudronManifestPath="CloudronManifest.json"
VOLUME [ "/app/data" ]
EXPOSE 3000
ENV DEBUG="blossom-server,blossom-server:*"
CMD [ "/app/start.sh" ]