Skip to content

Commit

Permalink
feat: support docker compose (GopeedLab#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
ifgris authored Nov 10, 2022
1 parent 7c6c361 commit 695da7e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
26 changes: 26 additions & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` 以便在宿主机访问下载完的文件。
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 695da7e

Please sign in to comment.