使用docker compose -T来执行数据导入

Signed-off-by: dhb52 <dhb52@126.com>
This commit is contained in:
dhb52 2023-06-12 08:32:26 +00:00 committed by Gitee
parent f59119bf6e
commit 70b48ca232
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -45,13 +45,11 @@ docker compose --env-file docker.env up -d
第一次执行由于数据库未初始化因此yudao-server容器会运行失败。执行如下命令初始化数据库
```shell
docker exec -i yudao-mysql \
sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" ruoyi-vue-pro' \
docker compose exec -T mysql \
sh -c 'exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" --default-character-set=utf8mb4 ruoyi-vue-pro' \
< ./sql/mysql/ruoyi-vue-pro.sql
```
注意这里用docker compose exec 会出现 `the input device is not a TTY` 报错
## Server:Port
- admin: http://localhost:8080