blossom-cloudron/Dockerfile

51 lines
1.4 KiB
Docker
Raw Normal View History

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/*
2024-11-04 15:09:32 +00:00
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
2024-11-04 15:09:32 +00:00
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
2024-11-05 16:48:34 +00:00
COPY config.example.yml config.yml
2024-11-05 11:19:51 +00:00
COPY CloudronManifest.json .
2024-11-04 15:09:32 +00:00
2024-11-05 11:35:03 +00:00
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
2024-11-04 17:31:08 +00:00
2024-11-05 11:11:36 +00:00
# Required by Cloudron
HEALTHCHECK CMD curl --fail http://localhost:3000 || exit 1
# Cloudron specific labels
LABEL cloudronManifestPath="CloudronManifest.json"
2024-11-05 16:03:27 +00:00
VOLUME [ "/app/data" ]
2024-11-04 15:09:32 +00:00
EXPOSE 3000
ENV DEBUG="blossom-server,blossom-server:*"
CMD [ "/app/start.sh" ]