Files
tehran_taj/apps/api/Dockerfile
T
mahmoodandClaude Code 3e9f532c6c fix(images): ship Linux codecs and preserve original-image fallback
Vendor the locked sharp Linux runtime and verify it during Docker builds. Add complete image response lengths and persistent frontend fallbacks, with real-codec HTTP and isolated release regression tests. Refresh tested API, admin and customer release artifacts.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-26 18:12:21 +03:30

24 lines
785 B
Docker

FROM node:20-bookworm
# Pre-built on the developer machine:
# pnpm build:release
# NOTE: full "bookworm" (not -slim/-alpine) on purpose — Prisma's query engine
# links against libssl.so.3, which the slim/alpine variants do not ship, and the
# deploy host cannot reach apt/apk mirrors to install it.
WORKDIR /app
ENV NODE_ENV=production
# Vendored Prisma lives in ./vendor (not node_modules — that path is gitignored)
ENV NODE_PATH=/app/vendor
ENV PRISMA_QUERY_ENGINE_LIBRARY=/app/vendor/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node
COPY release/ ./
# Fail the image build if native Linux image processing was not shipped.
# No install or registry access is needed on the deployment host.
RUN node verify-release-images.cjs
EXPOSE 3000
CMD ["node", "app.js"]