版本:
elasticsearch-oss:7.4.2skywalking-oap-server:10.1.0skywalking-ui:10.1.0
docker-compose.yaml 文件
version: '3.8'
services:
elasticsearch:
image: elasticsearch/elasticsearch-oss:7.4.2
container_name: elasticsearch
ports:
- "9200:9200"
- "9300:9300"
networks:
- sw
healthcheck:
test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
environment:
- discovery.type=single-node
#锁定物理内存地址,防止es内存被交换出去,也就是避免es使用swap交换分区,频繁的交换,会导致IOPS变高
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "TZ=Asia/Shanghai"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /data/elasticsearch/data:/usr/share/elasticsearch/data
#- /data/elasticsearch/logs:/usr/share/elasticsearch/logs
oap-server:
image: apache/skywalking-oap-server:10.1.0
container_name: oap-server
depends_on:
- elasticsearch
ports:
- "11800:11800"
- "12800:12800"
networks:
- sw
healthcheck:
test: [ "CMD-SHELL", "curl http://localhost:12800/internal/l7check" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
links:
- elasticsearch
environment:
SW_HEALTH_CHECKER: default
SW_TELEMETRY: prometheus
JAVA_OPTS: "-Xms2048m -Xmx2048m"
SW_STORAGE: elasticsearch
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
ui:
image: apache/skywalking-ui:10.1.0
container_name: ui
depends_on:
- oap-server
links:
- oap-server
ports:
- "8080:8080"
networks:
- sw
environment:
SW_OAP_ADDRESS: http://oap-server:12800
SW_ZIPKIN_ADDRESS: http://oap-server:9412
networks:
sw:
2024年11月20日大约 1 分钟