update README

This commit is contained in:
2022-07-10 02:06:00 +08:00
parent 4c4ddca82b
commit 58794a479d
3 changed files with 8 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ MAST_SECRET="<your client key>"
MAST_SCOPE="read:accounts"
AUTH_BACKEND_URL="http://hole.localhost"
FRONTEND_WHITELIST="https://hole-thu.github.io"
FRONTEND_WHITELIST="https://thuhollow.github.io"
DATABASE_URL="postgres://hole:hole_pass@localhost/hole_v2"
MIGRATION_DIRECTORY=migrations/postgres

View File

@@ -20,12 +20,12 @@ mkdir psql-docker-init
wget https://git.thu.monster/newthuhole/hole-backend-rust/raw/branch/master/psql-docker-init/add_pg_trgm.sh -O psql-docker-init/add_pg_trgm.sh
#下载镜像
# 下载镜像
docker-compose pull
# 初始化postgres
docker-compose up -d postgres
#建表
# 建表
docker-compose run --rm hole-thu hole-thu --init-database
# 全部跑起来
@@ -40,7 +40,9 @@ docker-compose up -d
docker-compose stop
```
可能需要修改`docker-compose.yml`的情况:
需要修改`docker-compose.yml`的情况:
+ 编辑services.hole-thu.environmen填入你的后端地址(用于登陆时的回调跳转)和前端地址(用于允许跨域)
+ 如果希望使用其他端口而非8000编辑services.hole-thu.ports

View File

@@ -25,3 +25,5 @@ services:
ROCKET_DATABASES: '{pg_v2={url="postgres://hole:hole_pass@postgres/hole_v2"}}'
ROCKET_ADDRESS: "0.0.0.0"
ROCKET_PORT: 8863
AUTH_BACKEND_URL: "<你的后端地址>"
FRONTEND_WHITELIST: "<你的前端地址1>,<你的前端地址2>"