obscura-server 0.4.3

A server for relaying secure messages using the Signal Protocol
Documentation
services:
  db:
    image: postgres:18-alpine
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
      POSTGRES_DB: signal_server
    ports:
      - "5432:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U user -d signal_server"]
      interval: 5s
      timeout: 5s
      retries: 5

  minio:
    image: minio/minio:latest
    command: server /data --console-address ":9001"
    environment:
      MINIO_ROOT_USER: minioadmin
      MINIO_ROOT_PASSWORD: minioadmin
    ports:
      - "9000:9000"
      - "9001:9001"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 5s
      timeout: 5s
      retries: 5

  valkey:
    image: valkey/valkey:9-alpine
    ports:
      - "6379:6379"
    healthcheck:
      test: ["CMD", "valkey-cli", "ping"]
      interval: 5s
      timeout: 5s
      retries: 5

  obscura-server:
    build: .
    ports:
      - "3000:3000"
      - "9090:9090"
    environment:
      OBSCURA_DATABASE_URL: postgres://user:password@db:5432/signal_server
      OBSCURA_PUBSUB_URL: redis://valkey:6379
      OBSCURA_JWT_SECRET: test_secret
      OBSCURA_STORAGE_BUCKET: test-bucket
      OBSCURA_STORAGE_ENDPOINT: http://minio:9000
      OBSCURA_STORAGE_ACCESS_KEY: minioadmin
      OBSCURA_STORAGE_SECRET_KEY: minioadmin
      OBSCURA_STORAGE_FORCE_PATH_STYLE: "true"
      OBSCURA_LOG_FORMAT: json
      OBSCURA_OTLP_ENDPOINT: http://lgtm:4317
      OBSCURA_TELEMETRY_METRICS_EXPORT_INTERVAL_SECS: 5
      RUST_LOG: debug
    depends_on:
      db:
        condition: service_healthy
      minio:
        condition: service_healthy
      valkey:
        condition: service_healthy
      lgtm:
        condition: service_started


  lgtm:
    image: grafana/otel-lgtm:latest
    ports:
      - "3001:3000" # Grafana
      - "4317:4317" # OTLP gRPC
      - "4318:4318" # OTLP HTTP
      - "3100:3100" # Loki
      - "3200:3200" # Tempo
    environment:
      - OTEL_METRIC_EXPORT_INTERVAL=5000