File size: 1,013 Bytes
d0910d6 085a79a 007df08 b64f28a 54d9852 033307e d4ea64f a304801 54d9852 9924d1f d4ea64f 5ad166a 0f793c0 6e8360f d4ea64f da5c398 d4ea64f 007df08 da5c398 007df08 a304801 b3ae17c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # Dify All-in-One for HF Spaces
FROM langgenius/dify-web:1.11.3 AS web
FROM langgenius/dify-api:1.11.3
USER root
# Install Nginx and Locales
RUN apt-get update && apt-get install -y --no-install-recommends nginx locales \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG=en_US.UTF-8
# Copy pre-built web
COPY --from=web /app/web /app/web
# Copy config files
COPY nginx.conf /etc/nginx/nginx.conf
# Force Cache Busting (Change value to force rebuild)
ARG FORCE_REBUILD=20260114_1637
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh && \
mkdir -p /app/api/storage /var/log/nginx /var/lib/nginx /run /var/cache/nginx && \
chown -R 1000:1000 /app /var/log/nginx /var/lib/nginx /run /var/cache/nginx /etc/nginx
ENV PORT=7860 \
MODE=api \
DEBUG=false \
STORAGE_TYPE=local \
STORAGE_LOCAL_PATH=/app/api/storage
EXPOSE 7860
USER 1000
WORKDIR /app/api
ENTRYPOINT []
CMD ["/bin/bash", "/app/start.sh"] |