Files
gsfdc/demo-dify/dify/web/Dockerfile.local
T
wuzilongandCursor 6519682885 chore: 纳入本地 Dify 1.19.0 源码及品牌与免登改动
演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 13:59:25 +08:00

34 lines
1.2 KiB
Docker

# Runtime image from host-built Next standalone (branding rebuild)
ARG NODE_VERSION=24.22.1
FROM node:${NODE_VERSION}-alpine AS production
ENV NODE_ENV=production
ENV DEPLOY_ENV=PRODUCTION
ENV CONSOLE_API_URL=http://127.0.0.1:5001
ENV APP_API_URL=http://127.0.0.1:5001
ENV MARKETPLACE_API_URL=https://marketplace.dify.ai
ENV MARKETPLACE_URL=https://marketplace.dify.ai
ENV PORT=3000
ENV EXPERIMENTAL_ENABLE_VINEXT=false
ENV NEXT_TELEMETRY_DISABLED=1
ENV TZ=UTC
RUN ln -s /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone
ARG dify_uid=1001
RUN addgroup -S -g ${dify_uid} dify && \
adduser -S -u ${dify_uid} -G dify -s /bin/ash -h /home/dify dify && \
mkdir /app && chown -R dify:dify /app
WORKDIR /app
COPY --chown=dify:dify .next/standalone ./targets/next/
COPY --chown=dify:dify public ./targets/next/web/public
COPY --chown=dify:dify .next/static ./targets/next/web/.next/static
# keep vinext slot present but unused (entrypoint only uses it when enabled)
RUN mkdir -p ./targets/vinext && chown -R dify:dify ./targets
COPY --chown=dify:dify --chmod=755 docker/entrypoint.sh ./entrypoint.sh
USER dify
EXPOSE 3000
ENTRYPOINT ["/bin/sh", "./entrypoint.sh"]