File size: 1,103 Bytes
f0c0382
 
 
8ed8da7
112f5fc
8ed8da7
f0c0382
 
8ed8da7
f0c0382
8ed8da7
 
f0c0382
 
 
 
 
 
 
 
 
 
 
8ed8da7
f0c0382
8ed8da7
 
f0c0382
 
 
 
 
 
 
 
69509c3
 
f0c0382
 
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
# ----------------------------------------------------------------------
# Stage 1: Build Stage
# ----------------------------------------------------------------------
FROM python:3.12-slim AS builder

RUN apt-get update && apt-get install -y --no-install-recommends \
    bash \
    git \
    build-essential \
    libffi-dev \
    libssl-dev \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

RUN git clone https://github.com/weebzone/Surf-TG /app

RUN pip install -U pip uv
RUN uv pip install --system --no-cache-dir -r requirements.txt

# ----------------------------------------------------------------------
# Stage 2: Final Stage
# ----------------------------------------------------------------------
FROM python:3.12-slim

RUN apt-get update && apt-get install -y --no-install-recommends bash git ca-certificates \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY --from=builder /app /app

ENV PORT=7860
ENV BASE_URL=https://lbp007-123.hf.space

EXPOSE 7860

CMD ["bash", "surf-tg.sh"]