volumes: prom: tempo: ydb_data: ydb_certs: services: # frontend (REST API) node front: profiles: - app - full build: context: . dockerfile: front.Dockerfile depends_on: ydb: condition: service_healthy ports: - "8080:8080" environment: - OTEL_LOG_LEVEL=debug - OTEL_EXPORTER_OTLP_PROTOCOL=grpc - OTEL_EXPORTER_OTLP_INSECURE=true - OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 - OTEL_GO_X_DEPRECATED_RUNTIME_METRICS=false - OTEL_GO_X_RESOURCE=true - OTEL_METRIC_EXPORT_INTERVAL=1000 - OTEL_METRIC_EXPORT_TIMEOUT=500 # storage nodes node: profiles: - app - full scale: 8 build: context: . dockerfile: node.Dockerfile depends_on: front: condition: service_healthy environment: - CHUNKS_DIR=/tmp/chunks - OTEL_LOG_LEVEL=debug - OTEL_EXPORTER_OTLP_PROTOCOL=grpc - OTEL_EXPORTER_OTLP_INSECURE=true - OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 - OTEL_GO_X_DEPRECATED_RUNTIME_METRICS=false - OTEL_GO_X_RESOURCE=true - OTEL_METRIC_EXPORT_INTERVAL=1000 - OTEL_METRIC_EXPORT_TIMEOUT=500 # Database for metadata # https://ydb.tech/docs/ru/quickstart ydb: image: "ydbplatform/local-ydb:latest" platform: linux/amd64 hostname: localhost profiles: - app - full ports: - "2135:2135" - "2136:2136" - "8765:8765" - "9092:9092" environment: - YDB_KAFKA_PROXY_PORT=9092 - GRPC_TLS_PORT=2135 - GRPC_PORT=2136 - MON_PORT=8765 volumes: - ydb_data:/ydb_data - ydb_certs:/ydb_certs # ---------- Observability stack below --------- # * Grafana http://localhost:3000 # * Grafana Loki <------| # * Grafana Tempo <---| | # * Prometheus <--| | | # * OpenTelemetry Collector <--| # stor-node-n------------| # stor-front-------------| prometheus: profiles: - full - observability image: "ghcr.io/go-faster/prom/prometheus:v3.1.0" command: - "--config.file=/etc/prometheus/prometheus.yml" - "--web.enable-otlp-receiver" restart: unless-stopped volumes: - ./_hack/prometheus.yml:/etc/prometheus/prometheus.yml - prom:/prometheus loki: profiles: - full - observability image: grafana/loki:2.9.0 command: -config.file=/etc/loki/local-config.yaml # https://opentelemetry.io/docs/collector/installation/#docker-compose otelcol: image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.89.0 volumes: - ./_hack/otelcol.yml:/etc/otelcol-contrib/config.yaml profiles: - full - observability depends_on: - prometheus - tempo command: - "--config" - "/etc/otelcol-contrib/config.yaml" tempo-init: # Need to chown first # https://github.com/grafana/tempo/issues/3601 profiles: - full - observability image: ubuntu user: root entrypoint: - "chown" - "10001:10001" - "/var/tempo" volumes: - tempo:/var/tempo tempo: profiles: - full - observability image: "grafana/tempo" command: ["-config.file=/etc/tempo.yml"] depends_on: - tempo-init volumes: - ./_hack/tempo.yml:/etc/tempo.yml - tempo:/tmp/tempo grafana: profiles: - full - observability image: "grafana/grafana" environment: - GF_AUTH_ANONYMOUS_ENABLED=true - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin - GF_AUTH_DISABLE_LOGIN_FORM=true - GF_FEATURE_TOGGLES_ENABLE=traceqlEditor,traceToMetrics,publicDashboards,tempoApmTable - GF_ALERTING_ENABLED=false - GF_USERS_ALLOW_SIGN_UP=false - GF_LOG_LEVEL=debug ports: - "3000:3000" volumes: - ./_hack/grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml - ./_hack/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/default.yml - ./_hack/grafana/dashboards:/etc/grafana/dashboards:ro depends_on: - prometheus - tempo - loki