61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
|
|
#
|
|||
|
|
# Copyright (c) 2013-Now https://jeesite.com All rights reserved.
|
|||
|
|
# No deletion without permission, or be held responsible to law.
|
|||
|
|
# @author ThinkGem
|
|||
|
|
#
|
|||
|
|
name: jeesite-fast-mysql
|
|||
|
|
|
|||
|
|
services:
|
|||
|
|
|
|||
|
|
# JeeSite MySQL,数据文件存放在 ./.docker/mysql 目录
|
|||
|
|
jeesite-fast-mysql:
|
|||
|
|
container_name: jeesite-fast-mysql
|
|||
|
|
image: docker.1ms.run/mysql:8.4
|
|||
|
|
ports:
|
|||
|
|
- "13306:3306"
|
|||
|
|
environment:
|
|||
|
|
TZ: Asia/Shanghai
|
|||
|
|
LANG: C.UTF-8
|
|||
|
|
MYSQL_ROOT_HOST: "%"
|
|||
|
|
MYSQL_ROOT_PASSWORD: 123456
|
|||
|
|
volumes:
|
|||
|
|
- ./.docker/mysql/log:/var/log/mysql
|
|||
|
|
- ./.docker/mysql/data:/var/lib/mysql
|
|||
|
|
- ./.docker/mysql/conf:/etc/mysql/conf.d
|
|||
|
|
- ./modules/core/db/mysql/create_user.sql:/docker-entrypoint-initdb.d/01-init.sql
|
|||
|
|
command: >
|
|||
|
|
sh -c "ln -snf /usr/share/zoneinfo/$${TZ} /etc/localtime &&
|
|||
|
|
echo $${TZ} > /etc/timezone && docker-entrypoint.sh mysqld"
|
|||
|
|
healthcheck:
|
|||
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p123456"]
|
|||
|
|
interval: 5s
|
|||
|
|
timeout: 5s
|
|||
|
|
retries: 60
|
|||
|
|
#restart: unless-stopped
|
|||
|
|
networks:
|
|||
|
|
- jeesite-fast-network
|
|||
|
|
|
|||
|
|
# JeeSite Fast,使用 MySQL 数据库,上传文件和日志等数据存放在 ./.docker/fast 目录
|
|||
|
|
jeesite-fast-web:
|
|||
|
|
container_name: jeesite-fast-web
|
|||
|
|
image: crpi-u3zm0t8trv68xpyx.cn-qingdao.personal.cr.aliyuncs.com/thinkgem/jeesite:latest
|
|||
|
|
ports:
|
|||
|
|
- "8980:8980"
|
|||
|
|
environment:
|
|||
|
|
MYSQL_HOST: jeesite-fast-mysql
|
|||
|
|
JAVA_OPTS: -Dspring.profiles.active=mysql -DcustomLogPath=/data
|
|||
|
|
volumes:
|
|||
|
|
- ./.docker/fast:/data
|
|||
|
|
#restart: unless-stopped
|
|||
|
|
networks:
|
|||
|
|
- jeesite-fast-network
|
|||
|
|
depends_on:
|
|||
|
|
jeesite-fast-mysql:
|
|||
|
|
condition: service_healthy
|
|||
|
|
|
|||
|
|
networks:
|
|||
|
|
jeesite-fast-network:
|
|||
|
|
name: jeesite-fast-network
|
|||
|
|
driver: bridge
|
|||
|
|
|
|||
|
|
# docker-compose -f docker-compose-mysql.yml up -d
|