feat: support docker compose (#54)

This commit is contained in:
cgcel authored and GitHub committed 2022-11-10 14:13:34 +08:00
1 parent 7c6c361d30
commit 695da7ea87
3 files changed
+63

No files matched your search

+26
View File
@@ -37,10 +37,36 @@ go install github.com/monkeyWie/gopeed/cmd/gopeed
### Docker
#### Start directly
```bash
docker run -d -p 9999:9999 -v /path/to/download:/download liwei2633/gopeed
```
#### Using Docker Compose
```yaml
version: '3'
services:
gopeed:
container_name: gopeed
ports:
- 9999:9999
image: liwei2633/gopeed
volumes:
- ~/Downloads:/download
restart: unless-stopped
```
Use the command below to start container:
```bash
docker compose up -d
```
#### Access Gopeed
When the docker container is running, you can access the web page through `http://localhost:9999`.
> Tip: Modify the download path to `/download` on the setting page to access the downloaded files on the host.
+26
View File
@@ -37,10 +37,36 @@ go install github.com/monkeyWie/gopeed/cmd/gopeed
### Docker
#### 直接运行
```bash
docker run -d -p 9999:9999 -v /path/to/download:/download liwei2633/gopeed
```
#### 使用 Docker Compose
```yaml
version: '3'
services:
gopeed:
container_name: gopeed
ports:
- 9999:9999
image: liwei2633/gopeed
volumes:
- ~/Downloads:/download
restart: unless-stopped
```
输入以下指令启动容器:
```bash
docker compose up -d
```
#### 访问服务
当 docker 容器运行时,可以通过 `http://localhost:9999` 访问 web 页面。
> 提示:在设置页面把下载路径修改为 `/download` 以便在宿主机访问下载完的文件。
+11
View File
@@ -0,0 +1,11 @@
version: '3'
services:
gopeed:
container_name: gopeed
ports:
- 9999:9999 # HTTP port (host:container)
image: liwei2633/gopeed
volumes:
- ~/Downloads:/download # replace with your prefer path
restart: unless-stopped