version: '3.1'

services:

  mariadb:
    image: mariadb:10.7.1
    container_name: mariadb
    network_mode: host
    restart: always
    ports:
     - 3306:3306
    volumes:
     - /share/data/docker/mariadb/mysql_data:/var/lib/mysql
     - /share/data/docker/mariadb/mysql_conf:/etc/mysql/conf.d
    environment:
      MARIADB_ROOT_PASSWORD: root
  redis:
    image: redis:6.2.6
    container_name: redis
    network_mode: host
    restart: always
    ports:
      - 6379:6379
    volumes:
      - /share/data/docker/redis/redis_conf/redis.conf:/usr/local/etc/redis/redis.conf:rw
      - /share/data/docker/redis/redis_data:/data:rw
    command:
      /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
  bmc_java:
    image: bmc_java:20240507.1
    container_name: bmc_java
    cpuset: 3,4,5
    mem_limit: 2048m
    network_mode: host
    restart: always
    ports:
     - 80:80
     - 8081:8081
    volumes:
     - /share/data/docker/bmc/javalogs:/share/data/docker/bmc/javalogs
     - /share/data/docker/bmc/uploadPath:/share/data/docker/bmc/uploadPath
     - /share/data/docker/bmcinit/resources:/share/data/docker/bmcinit/resources
  bmc_html:
    image: bmc_html:20240521.1
    container_name: bmc_html
    restart: always
    network_mode: host
    ports:
     - 8080:8080
     - 18080:18080
    volumes:
     - /share/data/docker/bmc/uploadPath/image:/share/data/docker/bmc/uploadPath/image
     - /share/data/docker/nginx/nginx_conf:/etc/nginx/conf.d
     - /share/data/docker/nginx/nginx_logs:/var/log/nginx:rw
