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

Merge pull request !508 from dhb52/N/A
This commit is contained in:
芋道源码 2023-06-17 04:26:51 +00:00 committed by Gitee
commit 03d7d2eead
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