乐趣区

关于mysql:yearning-docker-部署

yearning 是一款 sql 审核平台,界面和性能都还不错,举荐 2.3.5 版本。

docker-composer.yml

version: '3'

services:
    yearning:
        image: chaiyd/yearning:v2.3.5
        container_name: yearning
        environment:
           MYSQL_USER: yearning
           MYSQL_PASSWORD: ukC2ZkcG_ZTeb
           MYSQL_ADDR: yearning-mysql
           MYSQL_DB: yearning
           SECRET_KEY: dbcjqheupqjsuwsm
           IS_DOCKER: is_docker
        ports:
           - 8889:8000
        # 首次应用请先初始化
        command: /bin/bash -c "./Yearning install && ./Yearning run"
        links:
           - yearning-mysql
        depends_on:
           - yearning-mysql
        restart: always

    yearning-mysql:
        image: mysql:5.7
        container_name: yearning-mysql
        environment:
           MYSQL_ROOT_PASSWORD: ukC2ZkcG_ZTeb
           MYSQL_DATABASE: yearning
           MYSQL_USER: yearning
           MYSQL_PASSWORD: ukC2ZkcG_ZTeb
        command:
           - --character-set-server=utf8mb4
           - --collation-server=utf8mb4_general_ci
        volumes:
           - ./data/mysql:/var/lib/mysql

# 默认账号:admin,默认明码:Yearning_admin

yearning 依赖 mysql,这里创立一个 mysqlyearning 独自应用,如果你有本地或其余容器 mysql 也能够批改 yearningMYSQL_* 配置链接

mkdir /opt/yearning && cd /opt/yearning

# 创立并启动容器
docker-compose up -d

# 查看容器运行状态
docker-compose ps
退出移动版