写点什么

基于 docker-compose 部署 SkyWalking

作者:忙着长大#
  • 2023-03-01
    北京
  • 本文字数:1276 字

    阅读完需:约 4 分钟

一、docker-compose 部署 SkyWalking

docker-compose.yaml

cd 到 yaml 文件所在的目录执行 docker-compose up -d 即可

下面文件中的 ip 地址需要更改,通过 container name 去访问的时候会有 dns 解析超时的报错,还没找到具体原因。建议通过使用自定义 network 使容器间能够通过 container name 互相访问。

version: "3"services:    elasticsearch:        image: elasticsearch:8.4.2        container_name: elasticsearch        ports:        - "9200:9200"        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    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: 192.168.131.135: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        depends_on:            skywalking-oap:                condition: service_healthy        links:            - skywalking-oap        ports:        - "8080:8080"        environment:            SW_OAP_ADDRESS: http://192.168.131.135: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 #⾸次检测延迟时间
复制代码


用户头像

忙着长大#

关注

还未添加个人签名 2022-02-09 加入

还未添加个人简介

评论

发布
暂无评论
基于 docker-compose 部署 SkyWalking_Skywalking_忙着长大#_InfoQ写作社区