整合 elasticsearch mongodb graylog skywalking-oap skywalking -ui ```yaml version: "3" services: elasticsearch: image: elasticsearch:7.17.5 container_name: elasticsearch ports: - "9200:9200" - "9300:9300" healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"] #⼼跳检测,成功之后不再执⾏后⾯的退出 interval: 60s #⼼跳检测间隔周期 timeout: 10s retries: 3 start_period: 60s #⾸次检测延迟时间 environment: discovery.type: single-node #单节点模式 ingest.geoip.downloader.enabled: "false" bootstrap.memory_lock: "true" ES_JAVA_OPTS: "-Xms512m -Xmx512m" TZ: "Asia/Shanghai" xpack.security.enabled: "false" #单机模式 ulimits: memlock: soft: -1 hard: -1 mongodb: image: mongo:4.4 container_name: mongodb restart: always ports: - "27017:27017" environment: - MONGO_INITDB_ROOT_USERNAME=xlcs - MONGO_INITDB_ROOT_PASSWORD=123321 graylog: image: graylog/graylog:4.3 container_name: graylog ports: - "9000:9000" - "12201:12201/udp" environment: - GRAYLOG_HTTP_EXTERNAL_URI=http://10.211.55.50:9000/ - GRAYLOG_ELASTICSEARCH_HOSTS=http://10.211.55.50:9200/ - GRAYLOG_ROOT_TIMEZONE=Asia/Shanghai - GRAYLOG_WEB_ENDPOINT_URI=http://10.211.55.50:9000/api - GRAYLOG_PASSWORD_SECRET=somepasswordpepper - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 - GRAYLOG_MONGODB_URI=mongodb://xlcs:123321@10.211.55.50:27017/admin depends_on: - elasticsearch - mongodb links: - elasticsearch - mongodb skywalking-oap: image: apache/skywalking-oap-server:9.3.0 container_name: skywalking-oap depends_on: elasticsearch: condition: service_healthy links: - elasticsearch environment: SW_HEALTH_CHECKER: default SW_STORAGE: elasticsearch SW_STORAGE_ES_CLUSTER_NODES: 10.211.55.50:9200 JAVA_OPTS: "-Xms2048m -Xmx2048m" TZ: Asia/Shanghai SW_TELEMETRY: prometheus healthcheck: test: ["CMD-SHELL", "/skywalking/bin/swctl ch"] interval: 30s timeout: 10s retries: 3 start_period: 10s restart: on-failure ports: - "11800:11800" - "12800:12800" skywalking-ui: image: apache/skywalking-ui:9.3.0 container_name: skywalking-ui depends_on: skywalking-oap: condition: service_healthy links: - skywalking-oap ports: - "8080:8080" environment: SW_OAP_ADDRESS: http://10.211.55.50:12800 SW_HEALTH_CHECKER: default TZ: Asia/Shanghai healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:8080 || exit 1"] #⼼跳检测,成功之后不再执⾏后⾯的退出 interval: 60s #⼼跳检测间隔周期 timeout: 10s retries: 3 start_period: 60s #⾸次检测延迟时间 ``` ```yaml version: "3" services: elasticsearch: image: elasticsearch:7.17.5 container_name: elasticsearch ports: - "9200:9200" - "9300:9300" healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"] #⼼跳检测,成功之后不再执⾏后⾯的退出 interval: 60s #⼼跳检测间隔周期 timeout: 10s retries: 3 start_period: 60s #⾸次检测延迟时间 volumes: - es-data:/usr/share/elasticsearch/data - es-plugins:/usr/share/elasticsearch/plugins environment: discovery.type: single-node #单节点模式 ingest.geoip.downloader.enabled: "false" bootstrap.memory_lock: "true" ES_JAVA_OPTS: "-Xms512m -Xmx512m" TZ: "Asia/Shanghai" xpack.security.enabled: "false" #单机模式 privileged: true ulimits: memlock: soft: -1 hard: -1 mongodb: image: mongo:4.4 container_name: mongodb restart: always ports: - "27017:27017" volumes: - mongodb:/data/db environment: - MONGO_INITDB_ROOT_USERNAME=xlcs - MONGO_INITDB_ROOT_PASSWORD=123321 graylog: image: graylog/graylog:4.3 container_name: graylog ports: - "9000:9000" - "12201:12201/udp" environment: - GRAYLOG_HTTP_EXTERNAL_URI=http://10.211.55.50:9000/ - GRAYLOG_ELASTICSEARCH_HOSTS=http://10.211.55.50:9200/ - GRAYLOG_ROOT_TIMEZONE=Asia/Shanghai - GRAYLOG_WEB_ENDPOINT_URI=http://10.211.55.50:9000/api - GRAYLOG_PASSWORD_SECRET=somepasswordpepper - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 - GRAYLOG_MONGODB_URI=mongodb://xlcs:123321@10.211.55.50:27017/admin depends_on: - elasticsearch - mongodb links: - elasticsearch - mongodb skywalking-oap: image: apache/skywalking-oap-server:9.3.0 container_name: skywalking-oap depends_on: elasticsearch: condition: service_healthy links: - elasticsearch environment: SW_HEALTH_CHECKER: default SW_STORAGE: elasticsearch SW_STORAGE_ES_CLUSTER_NODES: 10.211.55.50:9200 JAVA_OPTS: "-Xms2048m -Xmx2048m" TZ: Asia/Shanghai SW_TELEMETRY: prometheus healthcheck: test: ["CMD-SHELL", "/skywalking/bin/swctl ch"] interval: 30s timeout: 10s retries: 3 start_period: 10s restart: on-failure ports: - "11800:11800" - "12800:12800" skywalking-ui: image: apache/skywalking-ui:9.3.0 container_name: skywalking-ui depends_on: skywalking-oap: condition: service_healthy links: - skywalking-oap ports: - "8080:8080" environment: SW_OAP_ADDRESS: http://10.211.55.50:12800 SW_HEALTH_CHECKER: default TZ: Asia/Shanghai healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:8080 || exit 1"] #⼼跳检测,成功之后不再执⾏后⾯的退出 interval: 60s #⼼跳检测间隔周期 timeout: 10s retries: 3 start_period: 60s #⾸次检测延迟时间 kibana: image: kibana:7.17.5 container_name: kibana ports: - "5601:5601" links: - elasticsearch:elasticsearch volumes: es-data: es-plugins: mongodb: ```