Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| LABEL maintainer="PromptForge" | |
| LABEL description="Structured prompt generator for Google AI Studio" | |
| # System deps | |
| RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python deps | |
| COPY backend/requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application | |
| COPY backend/ ./backend/ | |
| COPY frontend/ ./frontend/ | |
| # Logs directory | |
| RUN mkdir -p logs | |
| WORKDIR /app/backend | |
| # Environment defaults (override in your deployment / .env) | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=7860 | |
| ENV LOG_DIR=/app/logs | |
| ENV PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |