docker/zipkin/docker-compose.yml
2021-05-18 16:19:11 +08:00

70 lines
2.4 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '2'
services:
zipkin-mysql:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/zipkin-mysql
container_name: zipkin-mysql
# Uncomment to expose the storage port for testing
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=111111
- MYSQL_DATABASE=zipkin
- MYSQL_USER=zipkin
- MYSQL_PASSWORD=zipkin
volumes:
- ./data/mysqldata:/var/lib/mysql/:z
- ./data/logs:/var/log/mysql/:z
restart: on-failure
logging: &logging
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'
zipkin:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/zipkin
container_name: zipkin
ports:
# Port used for the Zipkin UI and HTTP Api
- 9411:9411
# Uncomment if you set SCRIBE_ENABLED=true
# - 9410:9410
environment:
- STORAGE_TYPE=mysql
# Point the zipkin at the storage backend
- MYSQL_HOST=zipkin-mysql
- MYSQL_USER=zipkin
- MYSQL_PASS=zipkin
# 部署到k8s报错的话设置此环境变量。注意跟mysql一致
# - ZIPKIN_STORAGE_MYSQL_PORT=3306
# Uncomment to enable scribe
# - SCRIBE_ENABLED=true
# Uncomment to enable self-tracing
# - SELF_TRACING_ENABLED=true
# Uncomment to enable debug logging
# - JAVA_OPTS=-Dlogging.level.zipkin2=DEBUG
restart: on-failure
logging:
<<: *logging
depends_on:
- zipkin-mysql
zipkin-dependencies:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/zipkin-dependencies
container_name: zipkin-dependencies
entrypoint: crond -f
environment:
- STORAGE_TYPE=mysql
- MYSQL_HOST=zipkin-mysql
# Add the baked-in username and password for the zipkin-mysql image
- MYSQL_USER=zipkin
- MYSQL_PASS=zipkin
# Uncomment to see dependency processing logs
# - ZIPKIN_LOG_LEVEL=DEBUG
# Uncomment to adjust memory used by the dependencies job
# - JAVA_OPTS=-verbose:gc -Xms1G -Xmx1G
restart: on-failure
logging:
<<: *logging
depends_on:
- zipkin-mysql