2023-07-28 17:08:29 +08:00
|
|
|
version: "3.4"
|
2023-04-25 22:54:56 +08:00
|
|
|
|
2023-05-10 23:39:31 +08:00
|
|
|
name: yudao-system
|
|
|
|
|
2023-04-25 22:54:56 +08:00
|
|
|
services:
|
|
|
|
mysql:
|
|
|
|
container_name: yudao-mysql
|
|
|
|
image: mysql:8
|
|
|
|
restart: unless-stopped
|
|
|
|
tty: true
|
|
|
|
ports:
|
2023-07-28 17:08:29 +08:00
|
|
|
- "3306:3306"
|
2023-04-25 22:54:56 +08:00
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE:-ruoyi-vue-pro}
|
|
|
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-123456}
|
|
|
|
volumes:
|
|
|
|
- mysql:/var/lib/mysql/
|
2023-07-28 17:08:29 +08:00
|
|
|
- ./sql/mysql/ruoyi-vue-pro.sql:/docker-entrypoint-initdb.d/ruoyi-vue-pro.sql:ro
|
2023-04-25 22:54:56 +08:00
|
|
|
|
|
|
|
redis:
|
|
|
|
container_name: yudao-redis
|
|
|
|
image: redis:6-alpine
|
2023-05-02 10:31:24 +08:00
|
|
|
restart: unless-stopped
|
2023-04-25 22:54:56 +08:00
|
|
|
ports:
|
2023-07-28 17:08:29 +08:00
|
|
|
- "6379:6379"
|
2023-05-12 11:03:13 +08:00
|
|
|
volumes:
|
|
|
|
- redis:/data
|
2023-04-25 22:54:56 +08:00
|
|
|
|
|
|
|
server:
|
|
|
|
container_name: yudao-server
|
|
|
|
build:
|
|
|
|
context: ./yudao-server/
|
|
|
|
image: yudao-server
|
2023-05-02 10:31:24 +08:00
|
|
|
restart: unless-stopped
|
2023-04-25 22:54:56 +08:00
|
|
|
ports:
|
2023-07-28 17:08:29 +08:00
|
|
|
- "48080:48080"
|
2023-04-25 22:54:56 +08:00
|
|
|
environment:
|
|
|
|
# https://github.com/polovyivan/docker-pass-configs-to-container
|
|
|
|
SPRING_PROFILES_ACTIVE: local
|
|
|
|
JAVA_OPTS:
|
|
|
|
${JAVA_OPTS:-
|
|
|
|
-Xms512m
|
|
|
|
-Xmx512m
|
|
|
|
-Djava.security.egd=file:/dev/./urandom
|
|
|
|
}
|
|
|
|
ARGS:
|
|
|
|
--spring.datasource.dynamic.datasource.master.url=${MASTER_DATASOURCE_URL:-jdbc:mysql://yudao-mysql:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true}
|
|
|
|
--spring.datasource.dynamic.datasource.master.username=${MASTER_DATASOURCE_USERNAME:-root}
|
|
|
|
--spring.datasource.dynamic.datasource.master.password=${MASTER_DATASOURCE_PASSWORD:-123456}
|
|
|
|
--spring.datasource.dynamic.datasource.slave.url=${SLAVE_DATASOURCE_URL:-jdbc:mysql://yudao-mysql:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true}
|
|
|
|
--spring.datasource.dynamic.datasource.slave.username=${SLAVE_DATASOURCE_USERNAME:-root}
|
|
|
|
--spring.datasource.dynamic.datasource.slave.password=${SLAVE_DATASOURCE_PASSWORD:-123456}
|
2024-03-30 17:44:24 +08:00
|
|
|
--spring.redis.host=${REDIS_HOST:-yudao-redis}
|
2023-04-25 22:54:56 +08:00
|
|
|
depends_on:
|
|
|
|
- mysql
|
|
|
|
- redis
|
|
|
|
|
|
|
|
admin:
|
|
|
|
container_name: yudao-admin
|
|
|
|
build:
|
|
|
|
context: ./yudao-ui-admin
|
|
|
|
args:
|
|
|
|
NODE_ENV:
|
|
|
|
ENV=${NODE_ENV:-production}
|
|
|
|
PUBLIC_PATH=${PUBLIC_PATH:-/}
|
|
|
|
VUE_APP_TITLE=${VUE_APP_TITLE:-芋道管理系统}
|
|
|
|
VUE_APP_BASE_API=${VUE_APP_BASE_API:-/prod-api}
|
|
|
|
VUE_APP_APP_NAME=${VUE_APP_APP_NAME:-/}
|
|
|
|
VUE_APP_TENANT_ENABLE=${VUE_APP_TENANT_ENABLE:-true}
|
|
|
|
VUE_APP_CAPTCHA_ENABLE=${VUE_APP_CAPTCHA_ENABLE:-true}
|
|
|
|
VUE_APP_DOC_ENABLE=${VUE_APP_DOC_ENABLE:-true}
|
|
|
|
VUE_APP_BAIDU_CODE=${VUE_APP_BAIDU_CODE:-fadc1bd5db1a1d6f581df60a1807f8ab}
|
|
|
|
image: yudao-admin
|
2023-05-02 10:31:24 +08:00
|
|
|
restart: unless-stopped
|
2023-04-25 22:54:56 +08:00
|
|
|
ports:
|
2023-07-28 17:08:29 +08:00
|
|
|
- "8080:80"
|
2023-04-25 22:54:56 +08:00
|
|
|
depends_on:
|
|
|
|
- server
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
mysql:
|
|
|
|
driver: local
|
2023-05-12 11:03:13 +08:00
|
|
|
redis:
|
|
|
|
driver: local
|