|
| 1 | +--- |
| 2 | +# FOR DEVELOPMENT ONLY |
| 3 | +# docker-compose -f docker-compose.memdb.yaml up --build |
| 4 | +services: |
| 5 | + spicedb-1: |
| 6 | + container_name: "spicedb-1" |
| 7 | + build: "." |
| 8 | + command: "serve" |
| 9 | + restart: "no" |
| 10 | + ports: |
| 11 | + - "50051:50051" # grpc endpoint |
| 12 | + - "8443:8443" # http endpoint |
| 13 | + - "9090:9090" # prometheus metrics |
| 14 | + environment: |
| 15 | + - "SPICEDB_LOG_FORMAT=json" |
| 16 | + - "SPICEDB_LOG_LEVEL=info" |
| 17 | + - "SPICEDB_HTTP_ENABLED=true" |
| 18 | + - "SPICEDB_GRPC_PRESHARED_KEY=super-secret-key" |
| 19 | + - "SPICEDB_DATASTORE_ENGINE=memory" |
| 20 | + - "SPICEDB_OTEL_PROVIDER=otlpgrpc" |
| 21 | + - "SPICEDB_OTEL_SAMPLE_RATIO=1" |
| 22 | + - "SPICEDB_TELEMETRY_ENDPOINT=" |
| 23 | + - "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=false" |
| 24 | + - "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false" |
| 25 | + - "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s" |
| 26 | + - "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317" |
| 27 | + - "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true" |
| 28 | + depends_on: |
| 29 | + otel-collector: |
| 30 | + condition: "service_started" |
| 31 | + healthcheck: |
| 32 | + test: ["CMD", "/bin/grpc_health_probe", "-addr=localhost:50051"] |
| 33 | + interval: "5s" |
| 34 | + timeout: "30s" |
| 35 | + retries: 3 |
| 36 | + prometheus: |
| 37 | + image: "prom/prometheus:v2.47.0" |
| 38 | + command: |
| 39 | + - "--config.file=/etc/prometheus/prometheus.yaml" |
| 40 | + - "--storage.tsdb.path=/prometheus" |
| 41 | + - "--enable-feature=native-histograms" |
| 42 | + volumes: |
| 43 | + - "./development/prometheus.yaml:/etc/prometheus/prometheus.yaml" |
| 44 | + ports: |
| 45 | + - "9091:9090" # Prometheus UI |
| 46 | + restart: "unless-stopped" |
| 47 | + otel-collector: |
| 48 | + image: "otel/opentelemetry-collector:0.60.0" |
| 49 | + command: "--config /etc/otel-config.yaml" |
| 50 | + volumes: |
| 51 | + - "./development/otel-config.yaml:/etc/otel-config.yaml" |
| 52 | + ports: |
| 53 | + - "4317:4317" # OTLP gRPC |
| 54 | + - "8888" # Prometheus metrics for collector |
| 55 | + depends_on: |
| 56 | + - "tempo" |
| 57 | + loki: |
| 58 | + image: "grafana/loki:2.9.0" |
| 59 | + command: "-config.file=/etc/loki/loki.yaml" |
| 60 | + volumes: |
| 61 | + - "./development/loki.yaml:/etc/loki/loki.yaml" |
| 62 | + ports: |
| 63 | + - "3100" # Loki API |
| 64 | + restart: "unless-stopped" |
| 65 | + tempo: |
| 66 | + image: "grafana/tempo:1.5.0" |
| 67 | + command: "-search.enabled=true -config.file=/etc/tempo.yaml" |
| 68 | + volumes: |
| 69 | + - "./development/tempo.yaml:/etc/tempo.yaml" |
| 70 | + restart: "unless-stopped" |
| 71 | + ports: |
| 72 | + - "4317" # OTLP gRPC |
| 73 | + - "3100" # tempo |
| 74 | + grafana: |
| 75 | + image: "grafana/grafana:9.1.5-ubuntu" |
| 76 | + volumes: |
| 77 | + - "./development/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources" |
| 78 | + - "./development/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards" |
| 79 | + - "./development/grafana/dashboards:/etc/grafana/dashboards" |
| 80 | + environment: |
| 81 | + - "GF_AUTH_ANONYMOUS_ENABLED=true" |
| 82 | + - "GF_AUTH_ANONYMOUS_ORG_ROLE=Admin" |
| 83 | + - "GF_AUTH_DISABLE_LOGIN_FORM=true" |
| 84 | + ports: |
| 85 | + - "3000:3000" # UI |
| 86 | + depends_on: |
| 87 | + - "tempo" |
| 88 | + - "prometheus" |
| 89 | + - "loki" |
0 commit comments