Skip to content

Commit

Permalink
feat(md): update
Browse files Browse the repository at this point in the history
  • Loading branch information
MorvanZhou committed May 23, 2024
1 parent 7a57b6c commit eee17c5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ Making the new thought more connectable and memorable.
which makes it easy to synchronize across multiple platforms.
5. **Multi-language**: Support multiple languages, including Chinese and English.

Deploy methods:

- [Deploy with Docker](#deploy-with-docker)
- [Deploy with Python](#deploy-with-python)

## Deploy with Docker

### Pull the image:
Expand All @@ -56,21 +61,33 @@ docker pull morvanzhou/rethink
For keeping your data safe, you should mount a local path to the container.

```shell
docker run -p 8080:8080 -v /your/data/path:/app/.data morvanzhou/rethink
docker run \
-p 8080:8080 \
-v /your/data/path:/app/.data \
morvanzhou/rethink
```

Then you can visit `http://127.0.0.1:8080` in your browser.

If you want to define another host's port, you have to also add an environment variable `API_URL`:
If you want to define another host's port, you have to also add an environment variable `API_URL`,
and make sure the port is the same as the host's port (`8001` in this example):

```shell
docker run -e API_URL=http://127.0.0.1:8001 -p 8001:8080 -v /your/data/path:/app/.data morvanzhou/rethink
docker run \
-e API_URL=http://127.0.0.1:8001 \
-p 8001:8080 \
-v /your/data/path:/app/.data \
morvanzhou/rethink
```

If you want to set a password for authorization, you have to also add a environment variable `APP_PASSWORD`:
If you want to set a password for authorization, just add a environment variable `APP_PASSWORD`:

```shell
docker run -e APP_PASSWORD=12345678 -p 8080:8080 -v /your/data/path:/app/.data morvanzhou/rethink
docker run \
-e APP_PASSWORD=12345678 \
-p 8080:8080 \
-v /your/data/path:/app/.data \
morvanzhou/rethink
```

### All environment variables:
Expand Down
7 changes: 6 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ Rethink 表示重新思考,是对个人成长的新理解。
,便于在多个平台之间同步;
5. **多语言**:支持多种语言,包括中文和英文。

安装部署方式:

- [使用 Docker 容器化部署](#使用-docker-容器化部署)
- [使用 Python 部署](#使用-python-部署)

## 使用 Docker 容器化部署

### 拉取镜像:
Expand All @@ -57,7 +62,7 @@ docker run -p 8080:8080 -v /your/data/path:/app/.data morvanzhou/rethink
现在你可以在浏览器中访问 `http://127.0.0.1:8080` 使用服务。

如果你想自定义其他端口,你除了需要修改 `-p` 参数的前半部分,还需要添加一个环境变量 `API_URL` 来重定向前端服务中的 API 的地址:
请确保 `API_URL` 里的端口号和 `-p` 参数的前半部分一致。
请确保 `API_URL` 里的端口号和 `-p` 参数的前半部分一致 (在下面案例中的 `8001` 端口)

```shell
docker run -e API_URL=http://127.0.0.1:8081 -p 8081:8080 -v /your/data/path:/app/.data morvanzhou/rethink
Expand Down

0 comments on commit eee17c5

Please sign in to comment.