docker-compose.yaml 3.6 KB
Newer Older
U
UlricQin 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
version: "3.7"

networks:
  nightingale:
    driver: bridge

services:
  mysql:
    image: "mysql:5.7"
    container_name: mysql
    hostname: mysql
    restart: always
    ports:
      - "3306:3306"
    environment:
      TZ: Asia/Shanghai
      MYSQL_ROOT_PASSWORD: 1234
    volumes:
      - ./mysqldata:/var/lib/mysql/
      - ./initsql:/docker-entrypoint-initdb.d/
      - ./mysqletc/my.cnf:/etc/my.cnf
    networks:
      - nightingale

  redis:
    image: "redis:6.2"
    container_name: redis
    hostname: redis
    restart: always
    ports:
      - "6379:6379"
    environment:
      TZ: Asia/Shanghai
    networks:
      - nightingale

  prometheus:
    image: prom/prometheus
    container_name: prometheus
    hostname: prometheus
    restart: always
    environment:
      TZ: Asia/Shanghai
    volumes:
      - ./prometc:/etc/prometheus
    ports:
      - "9090:9090"
    networks:
      - nightingale
    command:
      - "--config.file=/etc/prometheus/prometheus.yml"
      - "--storage.tsdb.path=/prometheus"
      - "--web.console.libraries=/usr/share/prometheus/console_libraries"
      - "--web.console.templates=/usr/share/prometheus/consoles"
      - "--enable-feature=remote-write-receiver"
      - "--query.lookback-delta=2m"

  ibex:
U
Ulric Qin 已提交
59
    image: ulric2019/ibex:0.3
U
UlricQin 已提交
60 61 62 63 64 65
    container_name: ibex
    hostname: ibex
    restart: always
    environment:
      GIN_MODE: release
      TZ: Asia/Shanghai
U
Ulric Qin 已提交
66
      WAIT_HOSTS: mysql:3306
U
UlricQin 已提交
67 68 69 70 71 72 73 74 75 76 77
    ports:
      - "10090:10090"
      - "20090:20090"
    volumes:
      - ./ibexetc:/app/etc
    networks:
      - nightingale
    depends_on:
      - mysql
    links:
      - mysql:mysql
U
Ulric Qin 已提交
78 79
    command: >
      sh -c "/wait && /app/ibex server"
U
UlricQin 已提交
80 81

  nwebapi:
U
Ulric Qin 已提交
82
    image: ulric2019/nightingale:5.9.2
U
UlricQin 已提交
83 84 85 86 87 88
    container_name: nwebapi
    hostname: nwebapi
    restart: always
    environment:
      GIN_MODE: release
      TZ: Asia/Shanghai
U
Ulric Qin 已提交
89
      WAIT_HOSTS: mysql:3306, redis:6379
U
UlricQin 已提交
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
    volumes:
      - ./n9eetc:/app/etc
    ports:
      - "18000:18000"
    networks:
      - nightingale
    depends_on:
      - mysql
      - redis
      - prometheus
      - ibex
    links:
      - mysql:mysql
      - redis:redis
      - prometheus:prometheus
      - ibex:ibex
U
Ulric Qin 已提交
106 107
    command: >
      sh -c "/wait && /app/n9e webapi"
U
UlricQin 已提交
108 109

  nserver:
U
Ulric Qin 已提交
110
    image: ulric2019/nightingale:5.9.2
U
UlricQin 已提交
111 112 113 114 115 116
    container_name: nserver
    hostname: nserver
    restart: always
    environment:
      GIN_MODE: release
      TZ: Asia/Shanghai
U
Ulric Qin 已提交
117
      WAIT_HOSTS: mysql:3306, redis:6379
U
UlricQin 已提交
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
    volumes:
      - ./n9eetc:/app/etc
    ports:
      - "19000:19000"
    networks:
      - nightingale
    depends_on:
      - mysql
      - redis
      - prometheus
      - ibex
    links:
      - mysql:mysql
      - redis:redis
      - prometheus:prometheus
      - ibex:ibex
U
Ulric Qin 已提交
134 135
    command: >
      sh -c "/wait && /app/n9e server"
U
UlricQin 已提交
136

137 138 139 140
  categraf:
    image: "flashcatcloud/categraf:v0.1.3"
    container_name: "categraf"
    hostname: "categraf01"
U
UlricQin 已提交
141 142 143
    restart: always
    environment:
      TZ: Asia/Shanghai
144 145 146
      HOST_PROC: /hostfs/proc
      HOST_SYS: /hostfs/sys
      HOST_MOUNT_PREFIX: /hostfs
U
UlricQin 已提交
147
    volumes:
148
      - ./categraf/conf:/etc/categraf/conf
149 150
      - /:/hostfs
      - /var/run/docker.sock:/var/run/docker.sock
U
UlricQin 已提交
151 152 153 154 155 156 157 158 159 160
    ports:
      - "8094:8094/tcp"
    networks:
      - nightingale
    depends_on:
      - nserver
    links:
      - nserver:nserver

  agentd:
U
Ulric Qin 已提交
161
    image: ulric2019/ibex:0.3
U
UlricQin 已提交
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
    container_name: agentd
    hostname: agentd
    restart: always
    environment:
      GIN_MODE: release
      TZ: Asia/Shanghai
    volumes:
      - ./ibexetc:/app/etc
    networks:
      - nightingale
    depends_on:
      - ibex
    links:
      - ibex:ibex
    command:
      - "/app/ibex"
      - "agentd"