FlowPacs/Docker-HOWTO.md
dhb52 70b48ca232
使用docker compose -T来执行数据导入
Signed-off-by: dhb52 <dhb52@126.com>
2023-06-12 08:32:26 +00:00

59 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Docker Build & Up
目标: 快速部署体验系统,帮助了解系统之间的依赖关系。
## 功能文件列表
```text
.
├── Docker-HOWTO.md
├── docker-compose.yml
├── docker.env
├── yudao-server
│ ├── Dockerfile
│ └── nginx.conf
└── yudao-ui-admin
├── .dockerignore
└── Dockerfile
```
## Maven build (Optional)
```shell
# 创建maven缓存volume
docker volume create --name yudao-maven-repo
docker run -it --rm --name yudao-maven \
-v yudao-maven-repo:/root/.m2 \
-v $PWD:/usr/src/mymaven \
-w /usr/src/mymaven \
maven mvn clean install package '-Dmaven.test.skip=true'
```
## Docker Compose Build
```shell
docker compose --env-file docker.env build
```
## Docker Compose Up
```shell
docker compose --env-file docker.env up -d
```
第一次执行由于数据库未初始化因此yudao-server容器会运行失败。执行如下命令初始化数据库
```shell
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
```
## Server:Port
- admin: http://localhost:8080
- API: http://localhost:48080
- mysql: root/123456, port: 3308
- redis: port: 6379