Spaces:
Running
Running
| FROM python:3.11-slim | |
| # non-interactive apt + wheels only (faster, avoids abuse flags) | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV PIP_DISABLE_PIP_VERSION_CHECK=1 | |
| ENV PIP_NO_CACHE_DIR=1 | |
| ENV PIP_ONLY_BINARY=:all: | |
| # only nginx (no supervisor) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| nginx \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /workspace | |
| # your working versions | |
| COPY requirements.txt ./ | |
| RUN pip install -r requirements.txt | |
| # app + nginx config + entrypoint | |
| COPY app.py robots.py nginx.conf run.sh ws_bridge.py ./ | |
| RUN chmod +x /workspace/run.sh \ | |
| && rm -f /etc/nginx/nginx.conf \ | |
| && ln -s /workspace/nginx.conf /etc/nginx/nginx.conf | |
| EXPOSE 7860 | |
| CMD ["/workspace/run.sh"] | |