Skip to content

Commit 91d9454

Browse files
build: add docker compose file (#222)
* Add Docker Compose file * docs: update docs --------- Co-authored-by: John Howe <89397553+timerring@users.noreply.github.com>
1 parent 02dfe35 commit 91d9454

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,27 @@ sudo docker run \
232232
ghcr.io/timerring/bilive-gpu:0.2.10
233233
```
234234

235+
### Docker Compose
236+
237+
`compose.yml` 调整方法见 [Installation](https://bilive.timerring.com/installation.html)
238+
239+
#### 使用镜像
240+
241+
默认 CPU latest version,如需使用 GPU 版本,请自行在 `compose.yml` 中调整。
242+
243+
```bash
244+
docker compose up -d
245+
```
246+
247+
#### 自行构建
248+
249+
请先在 `compose.yml` 中调整相关配置,然后执行以下命令:
250+
251+
```bash
252+
docker build
253+
docker compose up -d
254+
```
255+
235256
## 特别感谢
236257

237258
- [biliup/biliup-rs](https://github.com/biliup/biliup-rs)

compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
bilive:
3+
#build:
4+
# context: .
5+
# dockerfile: Dockerfile # Dockerfile-GPU
6+
image: ghcr.io/timerring/bilive:latest # ghcr.io/timerring/bilive-gpu:latest
7+
restart: always
8+
container_name: bilive_docker
9+
ports:
10+
- "22333:2233"
11+
tty: true
12+
stdin_open: true
13+
volumes:
14+
- ./app:/app

docs/installation.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,38 @@ logs # 日志文件夹
116116
> - 不推荐在有公网 ip 的服务器上直接暴露 22333 端口访问管理页面,如果使用请自行限制端口入站 ip 规则或者采用 nginx 等反向代理配置密钥限制他人访问。
117117
> - 管理页面主要针对 record 模块,只有手动运行 record 后(步骤5)才能访问到管理页面。
118118
119+
### Docker
119120
```bash
120121
sudo docker run \
121122
-itd \
122123
--name bilive_docker \
123124
-p 22333:2233 \
124125
timerring/bilive:0.2.10
126+
```
127+
128+
### Docker Compose
129+
130+
#### 使用镜像
131+
132+
默认 CPU latest version,如需使用 GPU 版本,请将 `image: ghcr.io/timerring/bilive:latest` 修改为 `image: ghcr.io/timerring/bilive-gpu:latest`
133+
```bash
134+
docker compose up -d
135+
```
136+
137+
#### 自行构建
138+
139+
相关配置已经写好,请自行将 `compose.yml` 3-6 行替换为:
140+
141+
```yaml
142+
build:
143+
context: .
144+
dockerfile: Dockerfile # Dockerfile-GPU
145+
# image: ghcr.io/timerring/bilive:latest # ghcr.io/timerring/bilive-gpu:latest
146+
```
147+
148+
然后执行以下命令:
149+
150+
```bash
151+
docker build
152+
docker compose up -d
125153
```

0 commit comments

Comments
 (0)