Skip to content

Commit

Permalink
Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock committed Aug 15, 2024
1 parent f63be64 commit 25755aa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.11-slim
COPY . /sing-box-subscribe
WORKDIR /sing-box-subscribe
RUN \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
EXPOSE 5000
CMD ["python", "api/app.py"]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ python main.py
python main.py --template_index=0
```

支持Docker

```
docker build --tag 'sing-box' .
docker run -p 5000:5000 sing-box:latest
```

### 根据已有的qx,surge,loon,clash规则列表自定义规则集[https://github.com/Toperlock/sing-box-geosite](https://github.com/Toperlock/sing-box-geosite)

### wechat规则集源文件写法:
Expand Down
2 changes: 1 addition & 1 deletion api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,4 @@ def download_config():
return str(e) # 或者适当处理异常,例如返回一个错误页面
"""
if __name__ == '__main__':
app.run(debug=True)
app.run(debug=True, host='0.0.0.0')

0 comments on commit 25755aa

Please sign in to comment.