更新 Dockerfile:build 時將 fonts/ 安裝至系統字體目錄

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 15:18:03 +08:00
parent 6076c76393
commit 55cb49a8bc

View File

@@ -13,6 +13,12 @@ RUN npm ci --omit=dev
COPY . .
RUN if [ -d fonts ] && ls fonts/*.{ttf,otf,ttc} 2>/dev/null | grep -q .; then \
mkdir -p /usr/local/share/fonts/custom && \
cp fonts/*.ttf fonts/*.otf fonts/*.ttc /usr/local/share/fonts/custom/ 2>/dev/null || true && \
fc-cache -f; \
fi
ENV NODE_ENV=production
ENV PORT=3000
ENV TEMPLATE_DIR=/app/templates