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:
+11
-4
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user