version: "3"
services:

   db:
     image: mysql:5.7
     volumes:
       - ~/data/mysql:/data/log
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: tank123
       MYSQL_DATABASE: tank
       MYSQL_USER: tank
       MYSQL_PASSWORD: tank123

   tank:
     build: .
     image: tank:1.0.2
     depends_on:
       - db
     ports:
       - "6010:6010"
     restart: always
     environment:
       TANK_MYSQL_PORT: 3306
       TANK_MYSQL_HOST: db
       TANK_MYSQL_SCHEMA: tank
       TANK_MYSQL_USERNAME: tank
       TANK_MYSQL_PASSWORD: tank123
       TANK_ADMIN_USERNAME: admin
       TANK_ADMIN_EMAIL: admin@tank.eyeblue.cn
       TANK_ADMIN_PASSWORD: 123456
     volumes:
       - ~/data/tank/log:/data/log
       - ~/data/tank/matter:/data/matter