Spaces:
Build error
Build error
| # Base image | |
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| python3 python3-pip python3-venv \ | |
| nodejs npm \ | |
| redis-server postgresql postgresql-contrib \ | |
| supervisor git curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Clone Dify | |
| WORKDIR /app | |
| RUN git clone https://github.com/langgenius/dify.git . | |
| # Setup Python backend | |
| WORKDIR /app/api | |
| RUN pip install -r requirements.txt | |
| # Setup frontend | |
| WORKDIR /app/web | |
| RUN npm install && npm run build | |
| # Setup Supervisor config | |
| WORKDIR /app | |
| COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
| # Expose ports | |
| EXPOSE 80 5001 | |
| CMD ["/usr/bin/supervisord"] |