fix the nework error

This commit is contained in:
neos 2024-04-19 05:27:07 +00:00
parent 12d76ea70e
commit 9dc768562f
3 changed files with 10 additions and 1 deletions

7
client/compose.yaml Normal file → Executable file
View File

@ -2,6 +2,7 @@ services:
web: web:
build: build:
dockerfile: Dockerfile.web dockerfile: Dockerfile.web
image: wiseflow/web
ports: ports:
- 8090:8090 - 8090:8090
# env_file: # env_file:
@ -9,9 +10,13 @@ services:
volumes: volumes:
- ./pb/pb_data:/pb/pb_data - ./pb/pb_data:/pb/pb_data
# - ./${PROJECT_DIR}:/pb/${PROJECT_DIR} # - ./${PROJECT_DIR}:/pb/${PROJECT_DIR}
api: api:
build: build:
dockerfile: Dockerfile.api dockerfile: Dockerfile.api
image: wiseflow/api
tty: true
stdin_open: true
env_file: env_file:
- .env - .env
ports: ports:
@ -20,3 +25,5 @@ services:
- ./${PROJECT_DIR}:/app/${PROJECT_DIR} - ./${PROJECT_DIR}:/app/${PROJECT_DIR}
- ${EMBEDDING_MODEL_PATH}:${EMBEDDING_MODEL_PATH} - ${EMBEDDING_MODEL_PATH}:${EMBEDDING_MODEL_PATH}
- ${RERANKER_MODEL_PATH}:${RERANKER_MODEL_PATH} - ${RERANKER_MODEL_PATH}:${RERANKER_MODEL_PATH}
depends_on:
- web

3
client/env_sample Normal file → Executable file
View File

@ -10,4 +10,5 @@ export DEVICE=''
#**for processer** #**for processer**
export PROJECT_DIR="" export PROJECT_DIR=""
export WS_LOG="verbose" export WS_LOG="verbose"
export PB_API_AUTH='email|password' export PB_API_AUTH='test@example.com|123467890'
export PB_API_BASE='web:8090' ##可以参考https://stackoverflow.com/questions/70151702/how-to-network-2-separate-docker-containers-to-communicate-with-eachother

1
client/pb/README.md Normal file → Executable file
View File

@ -8,5 +8,6 @@
```bash ```bash
cd pb cd pb
./pocketbase --dev admin create test@example.com 123467890 #如果没有初始账号,请用这个命令创建
./pocketbase serve ./pocketbase serve
``` ```