2024-11-05 11:04:03 +00:00
|
|
|
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
|
2024-11-05 11:04:03 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2024-11-05 11:04:03 +00:00
|
|
|
COPY start.sh start.sh
|
|
|
|
COPY config.example.yml config.yml
|
2024-11-04 15:09:32 +00:00
|
|
|
|
2024-11-05 11:04:03 +00:00
|
|
|
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-04 15:09:32 +00:00
|
|
|
VOLUME [ "/app/data" ]
|
|
|
|
EXPOSE 3000
|
|
|
|
|
|
|
|
ENV DEBUG="blossom-server,blossom-server:*"
|
|
|
|
|
2024-11-05 11:04:03 +00:00
|
|
|
CMD [ "/app/start.sh" ]
|