Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +2 -19
Dockerfile
CHANGED
|
@@ -20,23 +20,6 @@ RUN apt-get update && apt-get install -y \
|
|
| 20 |
|
| 21 |
# 克隆源代码
|
| 22 |
RUN git clone https://github.com/Theyka/Turnstile-Solver.git .
|
| 23 |
-
|
| 24 |
-
# 创建 app.py 文件
|
| 25 |
-
RUN cat > app.py << 'EOF'
|
| 26 |
-
from api_solver import TurnstileAPIServer
|
| 27 |
-
|
| 28 |
-
app = TurnstileAPIServer(
|
| 29 |
-
headless=True,
|
| 30 |
-
useragent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
|
| 31 |
-
debug=False,
|
| 32 |
-
browser_type="chromium",
|
| 33 |
-
thread=1,
|
| 34 |
-
proxy_support=False
|
| 35 |
-
).app
|
| 36 |
-
|
| 37 |
-
if __name__ == "__main__":
|
| 38 |
-
app.run(host="0.0.0.0", port=7860)
|
| 39 |
-
EOF
|
| 40 |
|
| 41 |
# 安装 Python 依赖
|
| 42 |
RUN pip install -r requirements.txt
|
|
@@ -48,5 +31,5 @@ RUN python -m playwright install-deps chromium
|
|
| 48 |
# 暴露端口
|
| 49 |
EXPOSE 7860
|
| 50 |
|
| 51 |
-
# 启动命令
|
| 52 |
-
CMD ["python", "
|
|
|
|
| 20 |
|
| 21 |
# 克隆源代码
|
| 22 |
RUN git clone https://github.com/Theyka/Turnstile-Solver.git .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# 安装 Python 依赖
|
| 25 |
RUN pip install -r requirements.txt
|
|
|
|
| 31 |
# 暴露端口
|
| 32 |
EXPOSE 7860
|
| 33 |
|
| 34 |
+
# 启动命令 - 直接使用 api_solver.py
|
| 35 |
+
CMD ["python", "api_solver.py", "--headless", "True", "--useragent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "--host", "0.0.0.0", "--port", "7860"]
|