volumes: prom: services: db: image: postgres:18 restart: always shm_size: 128mb environment: POSTGRES_PASSWORD: postgres server: image: ghcr.io/ernado/example command: ["server"] build: context: . dockerfile: build.Dockerfile restart: always environment: - OTEL_LOG_LEVEL=debug - OTEL_METRICS_EXPORTER=otlp - OTEL_LOGS_EXPORTER=otlp - OTEL_TRACES_EXPORTER=otlp - OTEL_EXPORTER_OTLP_PROTOCOL=grpc - OTEL_EXPORTER_OTLP_INSECURE=true - OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 - OTEL_RESOURCE_ATTRIBUTES=service.name=go-faster.example.server - OTEL_METRIC_EXPORT_INTERVAL=15000 - DATABASE_URL=postgres://postgres:postgres@db:5432/postgres?sslmode=disable client: image: ghcr.io/ernado/example command: ["client"] build: context: . dockerfile: build.Dockerfile restart: always environment: - OTEL_LOG_LEVEL=debug - OTEL_METRICS_EXPORTER=otlp - OTEL_LOGS_EXPORTER=otlp - OTEL_TRACES_EXPORTER=otlp - OTEL_EXPORTER_OTLP_PROTOCOL=grpc - OTEL_EXPORTER_OTLP_INSECURE=true - OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 - OTEL_RESOURCE_ATTRIBUTES=service.name=go-faster.example.client - OTEL_METRIC_EXPORT_INTERVAL=15000 oteldb: image: ghcr.io/go-faster/oteldb:v0.22.1 environment: - OTELDB_STORAGE=ch - OTEL_LOG_LEVEL=info - OTEL_METRICS_EXPORTER=none - OTEL_LOGS_EXPORTER=none - OTEL_TRACES_EXPORTER=none prometheus: image: "ghcr.io/go-faster/prom/prometheus:v3.6.0" command: - "--config.file=/etc/prometheus/prometheus.yml" - "--web.enable-remote-write-receiver" - "--web.enable-otlp-receiver" restart: unless-stopped volumes: - ./_hack/prometheus.yml:/etc/prometheus/prometheus.yml - prom:/prometheus # 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 depends_on: - oteldb environment: # probably excessive - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://otelcol:4317 command: - "--config" - "/etc/otelcol-contrib/config.yaml" # https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/observability.md#how-we-expose-telemetry - "--feature-gates=telemetry.useOtelForInternalMetrics" - "--feature-gates=telemetry.useOtelWithSDKConfigurationForInternalTelemetry" grafana: image: "ghcr.io/go-faster/grafana:12.2.0-17142428006-ubuntu" 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 - GF_INSTALL_PLUGINS=grafana-clickhouse-datasource 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: - oteldb - otelcol