version: "3.7"
services:
  web:
    image: threatbook/hfish-server:2.6.2
    network_mode: "host"
    container_name: hfish-server # 容器名
    restart: always
    volumes:
      - "./logs:/opt/hfish/logs"
      - "/root/.hfish:/root/.hfish"
    depends_on:
      - db
    # 启动命令， 格式为 sh /wait.sh hfish mysql用户名  mysql密码  mysql端口号 /opt/hfish/server
    command: sh /wait.sh hfish root Ke865aE047eF648C 3306 /opt/hfish/server

  db:
    image: threatbook/hfish-mysql:2.6.2
#    build: ./mysql
    restart: always
    container_name: hfish-mysql-db # 容器名
    environment:
      - MYSQL_ROOT_PASSWORD=Ke865aE047eF648C
      - TZ=Asia/Shanghai
    ports:
      - 3306:3306
    volumes:
      - ./data:/var/lib/mysql
    command: --character-set-server=utf8mb4
      --collation-server=utf8mb4_general_ci
      --explicit_defaults_for_timestamp=true
      --lower_case_table_names=1
      --default-time-zone=+08:00

