File size: 708 Bytes
79ee8ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ac54616
79ee8ac
 
 
 
 
 
 
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
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"]