1 Star 1 Fork 24.3K

jeff-qiu / RuoYi-Vue

forked from 若依 / RuoYi-Vue 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker-compose.yaml 2.21 KB
一键复制 编辑 原始数据 按行查看 历史
name: "ruoyi"
services:
frontend:
image: ruoyi-ui
build:
context: ./ruoyi-ui
dockerfile: ../frontend.Dockerfile
ports:
- 80:80
#volumes:
#- ./ruoyi-ui/nginx-sample.conf:/etc/nginx/conf.d/default.conf
networks:
- net-1
healthcheck:
test: [ "CMD", "curl","-f","http://localhost:80" ]
interval: 10s
timeout: 5s
retries: 3
depends_on:
backend:
condition: service_healthy
backend:
image: ruoyi-admin
build:
dockerfile: backend.Dockerfile
command: [
"--ruoyi.profile=/home/ruoyi/uploadPath",
"--spring.datasource.druid.master.url=jdbc:mysql://mysql:3306/ry-vue?useUnicode=true&characterEncoding=utf8",
"--spring.datasource.druid.master.username=root",
"--spring.datasource.druid.master.password=123456",
"--spring.redis.host=redis"
]
ports:
- 8080:8080
volumes:
- data-upload:/home/ruoyi/uploadPath
- ~/.m2:/root/.m2
networks:
- net-1
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080" ]
interval: 20s
timeout: 5s
retries: 3
depends_on:
mysql:
condition: service_healthy
mysql:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=ry-vue
ports:
- 3306:3306
command: [
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_general_ci",
"--skip-character-set-client-handshake"
]
volumes:
- ./sql:/docker-entrypoint-initdb.d
- data-mysql:/var/lib/mysql
networks:
- net-1
healthcheck:
#test: [ "CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p123456' ]
test: [ "CMD-SHELL", 'mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD || exit 1' ]
interval: 10s
timeout: 5s
retries: 3
depends_on:
redis:
condition: service_healthy
redis:
image: redis:7.0
ports:
- 6379:6379
volumes:
- data-redis:/data
networks:
- net-1
healthcheck:
test: [ "CMD", 'redis-cli',"ping" ]
interval: 10s
timeout: 5s
retries: 3
volumes:
data-mysql:
data-redis:
data-upload:
networks:
net-1:
JavaScript
1
https://gitee.com/jeff-qiu/RuoYi-Vue.git
git@gitee.com:jeff-qiu/RuoYi-Vue.git
jeff-qiu
RuoYi-Vue
RuoYi-Vue
master

搜索帮助