init
This commit is contained in:
commit
440f572834
53 files changed
+12776
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
# 使用 debian(glibc)而非 alpine(musl):原生加密模块
|
||||
# @matrix-org/matrix-sdk-crypto-nodejs 在 arm64 上只提供 gnu(glibc)预编译,
|
||||
# 不支持 arm64-musl;debian 同时覆盖 x64/arm64,适配 Apple Silicon 上的 Docker。
|
||||
FROM node:22-slim AS build
|
||||
WORKDIR /app
|
||||
# openssl: Prisma 引擎;ca-certificates: postinstall 从 github 下载加密二进制。
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run prisma:generate && npm run build
|
||||
|
||||
FROM node:22-slim AS runtime
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/node_modules/.prisma ./node_modules/.prisma
|
||||
COPY --from=build /app/node_modules/@prisma ./node_modules/@prisma
|
||||
COPY prisma ./prisma
|
||||
COPY config ./config
|
||||
COPY docker-entrypoint.sh ./
|
||||
RUN chmod +x docker-entrypoint.sh
|
||||
# 数据目录(运行时由 compose 把宿主 ./data 挂载到此;含 SQLite 与加密 store)。
|
||||
RUN mkdir -p /app/data
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
Reference in new issue
Block a user