mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-21 21:45:21 +03:00
#### PR Dependency Tree * **PR #15729** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Deployment** * Updated the Cloud SQL Proxy image and integrated it with deployment charts. * Containers now run with stricter security settings, including non-root execution and read-only filesystems. * **Desktop** * Updated Electron and Node versions and adjusted Windows builds to support multiple architectures. * **Maintenance** * Updated Vite and Storybook versions across development tools. * Improved production GraphQL schema handling. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
36 lines
1.1 KiB
Docker
36 lines
1.1 KiB
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM node:22-bookworm-slim AS assets
|
|
WORKDIR /app
|
|
|
|
COPY ./packages/backend/server /app
|
|
COPY ./packages/frontend/apps/web/dist /app/static
|
|
COPY ./packages/frontend/admin/dist /app/static/admin
|
|
COPY ./packages/frontend/apps/mobile/dist /app/static/mobile
|
|
|
|
# Keep server sourcemap for stacktraces, but don't ship frontend/node_modules sourcemaps.
|
|
ARG TARGETARCH
|
|
ARG TARGETVARIANT
|
|
# Needed for Prisma engine resolution (and potential engine download during cleanup).
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends openssl ca-certificates && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN AFFINE_DOCKER_CLEAN=1 TARGETARCH="${TARGETARCH}" TARGETVARIANT="${TARGETVARIANT}" node ./scripts/docker-clean.mjs
|
|
|
|
FROM node:22-bookworm-slim
|
|
WORKDIR /app
|
|
|
|
COPY --from=assets /app /app
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends openssl libjemalloc2 ca-certificates && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Enable jemalloc by preloading the library
|
|
ENV LD_PRELOAD=libjemalloc.so.2
|
|
|
|
EXPOSE 3010
|
|
|
|
CMD ["sh", "-c", "node ./scripts/upgrade-config.js && exec node ./dist/main.js"]
|