Bundle families frontend and billing data

This commit is contained in:
Andreas Dueren
2025-11-20 11:54:40 -06:00
parent f29b570b82
commit 617236558e
7 changed files with 449 additions and 7 deletions

View File

@@ -1,12 +1,28 @@
# syntax=docker/dockerfile:1
ARG ENTE_GIT_REF=main
ARG FAMILIES_GIT_REF=main
FROM debian:bookworm AS ente-source
ARG ENTE_GIT_REF
COPY patches /patches
RUN set -e; \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates git patch && \
git clone --depth=1 --branch "${ENTE_GIT_REF}" https://github.com/ente-io/ente.git /src && \
if [ -d /patches ]; then \
for patch_file in /patches/*.patch; do \
[ -f "$patch_file" ] || continue; \
(cd /src && patch -p1 < "$patch_file"); \
done; \
fi && \
rm -rf /var/lib/apt/lists/*
FROM debian:bookworm AS families-source
ARG FAMILIES_GIT_REF
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates git && \
git clone --depth=1 --branch "${ENTE_GIT_REF}" https://github.com/ente-io/ente.git /src && \
git clone --depth=1 --branch "${FAMILIES_GIT_REF}" https://github.com/ente-io/families.git /families && \
rm -rf /var/lib/apt/lists/*
FROM golang:1.24-bookworm AS museum-builder
@@ -63,9 +79,26 @@ RUN if [ -d "apps" ]; then \
printf '<html><body><h1>Ente %s</h1><p>Build output missing.</p></body></html>\n' "${app}" > "/build/web/${app}/index.html"; \
done; \
fi && \
rm -rf /build/web/albums /build/web/family && \
cp -r /build/web/photos /build/web/albums && \
cp -r /build/web/photos /build/web/family
rm -rf /build/web/albums && \
cp -r /build/web/photos /build/web/albums
FROM node:20-bookworm-slim AS families-builder
ENV NEXT_PUBLIC_ENTE_ENDPOINT=ENTE_API_ORIGIN_PLACEHOLDER \
NEXT_WEB_ENTE_ENDPOINT=ENTE_WEB_ENDPOINT_PLACEHOLDER \
NEXT_PUBLIC_IS_SENTRY_ENABLED=no \
NEXT_PUBLIC_SENTRY_ENV=local \
NEXT_PUBLIC_SENTRY_DSN= \
NEXT_TELEMETRY_DISABLED=1
COPY --from=families-source /families /families
WORKDIR /families
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential python3 && \
rm -rf /var/lib/apt/lists/*
RUN corepack enable
RUN yarn install --network-timeout 1000000
RUN mkdir -p /build/family && \
yarn build && \
./node_modules/.bin/next export -o /build/family
FROM cloudron/base:5.0.0@sha256:04fd70dbd8ad6149c19de39e35718e024417c3e01dc9c6637eaf4a41ec4e596c
@@ -80,6 +113,7 @@ RUN apt-get update && \
RUN mkdir -p /app/pkg /app/web "$HOME" && chown -R cloudron:cloudron /app /app/web "$HOME"
COPY --from=ente-source /src ${APP_DIR}
COPY data ${APP_DIR}/data
RUN rm -rf ${APP_DIR}/.git
RUN mkdir -p /app/museum-bin
@@ -98,7 +132,7 @@ COPY --from=web-builder /build/web/accounts /app/web/accounts
COPY --from=web-builder /build/web/auth /app/web/auth
COPY --from=web-builder /build/web/cast /app/web/cast
COPY --from=web-builder /build/web/albums /app/web/albums
COPY --from=web-builder /build/web/family /app/web/family
COPY --from=families-builder /build/family /app/web/family
COPY start.sh /app/pkg/start.sh
COPY admin-helper.sh /app/pkg/admin-helper.sh