Fix Prisma runtime by switching API image to Debian slim

Alpine musl is incompatible with host-built Prisma engines; use bookworm-slim and allow updating entrypoint without repacking the bundle.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 22:04:27 +03:30
co-authored by Cursor
parent 6ed952cc5d
commit fe324936c8
4 changed files with 16 additions and 7 deletions
+11 -4
View File
@@ -1,13 +1,20 @@
# باندل از گیت می‌آید؛ داخل ایمیج باز می‌شود — روی سرور tar لازم نیست
FROM node:22-alpine
# باندل روی glibc ساخته شده؛ Alpine (musl) با Prisma سازگار نیست
FROM node:22-bookworm-slim
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 deploy-bundle.tar.gz /tmp/deploy-bundle.tar.gz
RUN tar -xzf /tmp/deploy-bundle.tar.gz -C /app \
&& rm /tmp/deploy-bundle.tar.gz \
&& chmod +x /app/docker-entrypoint.sh
&& rm /tmp/deploy-bundle.tar.gz
# entrypoint از ریپو (قابل آپدیت بدون بازسازی کل باندل)
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
RUN chmod +x /app/docker-entrypoint.sh
EXPOSE 3000
ENTRYPOINT ["./docker-entrypoint.sh"]