blossom-cloudron/Dockerfile
Stixx 077f388cd0
All checks were successful
Release to Gitea Container Registry / build_and_push (push) Successful in 13s
chore: docker BLOSSOM_CONFIG env
2024-11-06 17:25:51 +01:00

50 lines
1.4 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 CloudronManifest.json .
RUN chmod +x start.sh
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" ]