update README
This commit is contained in:
@@ -4,7 +4,7 @@ MAST_SECRET="<your client key>"
|
|||||||
MAST_SCOPE="read:accounts"
|
MAST_SCOPE="read:accounts"
|
||||||
|
|
||||||
AUTH_BACKEND_URL="http://hole.localhost"
|
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"
|
DATABASE_URL="postgres://hole:hole_pass@localhost/hole_v2"
|
||||||
MIGRATION_DIRECTORY=migrations/postgres
|
MIGRATION_DIRECTORY=migrations/postgres
|
||||||
|
|||||||
@@ -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
|
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
|
docker-compose pull
|
||||||
# 初始化postgres
|
# 初始化postgres
|
||||||
docker-compose up -d postgres
|
docker-compose up -d postgres
|
||||||
|
|
||||||
#建表
|
# 建表
|
||||||
docker-compose run --rm hole-thu hole-thu --init-database
|
docker-compose run --rm hole-thu hole-thu --init-database
|
||||||
|
|
||||||
# 全部跑起来
|
# 全部跑起来
|
||||||
@@ -40,7 +40,9 @@ docker-compose up -d
|
|||||||
docker-compose stop
|
docker-compose stop
|
||||||
```
|
```
|
||||||
|
|
||||||
可能需要修改`docker-compose.yml`的情况:
|
需要修改`docker-compose.yml`的情况:
|
||||||
|
|
||||||
|
+ 编辑services.hole-thu.environmen填入你的后端地址(用于登陆时的回调跳转)和前端地址(用于允许跨域)
|
||||||
|
|
||||||
+ 如果希望使用其他端口而非8000,编辑services.hole-thu.ports
|
+ 如果希望使用其他端口而非8000,编辑services.hole-thu.ports
|
||||||
|
|
||||||
|
|||||||
@@ -25,3 +25,5 @@ services:
|
|||||||
ROCKET_DATABASES: '{pg_v2={url="postgres://hole:hole_pass@postgres/hole_v2"}}'
|
ROCKET_DATABASES: '{pg_v2={url="postgres://hole:hole_pass@postgres/hole_v2"}}'
|
||||||
ROCKET_ADDRESS: "0.0.0.0"
|
ROCKET_ADDRESS: "0.0.0.0"
|
||||||
ROCKET_PORT: 8863
|
ROCKET_PORT: 8863
|
||||||
|
AUTH_BACKEND_URL: "<你的后端地址>"
|
||||||
|
FRONTEND_WHITELIST: "<你的前端地址1>,<你的前端地址2>"
|
||||||
|
|||||||
Reference in New Issue
Block a user