diff --git a/devservices/config.yml b/devservices/config.yml new file mode 100644 index 0000000..1018f79 --- /dev/null +++ b/devservices/config.yml @@ -0,0 +1,44 @@ +x-sentry-service-config: + version: 0.1 + service_name: synapse + description: Cell routing services (proxy + ingest-router). + modes: + default: + - synapse-proxy + - synapse-ingest-router + +services: + synapse-proxy: + image: us-docker.pkg.dev/sentryio/synapse/image:latest + command: ["proxy", "--config-file-path", "/app/proxy.yaml"] + ports: + - "13000:3000" + - "13001:3001" + volumes: + - ./proxy.yaml:/app/proxy.yaml:ro + - synapse-proxy-cache:/tmp/synapse-cache + networks: + - devservices + restart: unless-stopped + + synapse-ingest-router: + image: us-docker.pkg.dev/sentryio/synapse/image:latest + command: ["ingest-router", "--config-file-path", "/app/ingest-router.yaml"] + ports: + - "13002:3000" + - "13003:3001" + volumes: + - ./ingest-router.yaml:/app/ingest-router.yaml:ro + - synapse-ingest-router-cache:/tmp/synapse-cache + networks: + - devservices + restart: unless-stopped + +volumes: + synapse-proxy-cache: + synapse-ingest-router-cache: + +networks: + devservices: + name: devservices + external: true diff --git a/devservices/ingest-router.yaml b/devservices/ingest-router.yaml new file mode 100644 index 0000000..058bb41 --- /dev/null +++ b/devservices/ingest-router.yaml @@ -0,0 +1,68 @@ +ingest_router: + listener: + host: "0.0.0.0" + port: 3000 + admin_listener: + host: "0.0.0.0" + port: 3001 + + locator: + type: in_process + control_plane: + url: http://host.docker.internal:8000 + backup_route_store: + type: filesystem + base_dir: /tmp/synapse-cache + filename: backup.bin + compression: zstd1 + localities: + - "--monolith--" + locality_to_default_cell: + "--monolith--": "--monolith--" + + locales: + "--monolith--": + - id: "--monolith--" + sentry_url: http://host.docker.internal:8000 + relay_url: http://relay:7899 + + routes: + - match: + host: localhost + path: /api/0/relays/projectconfigs/ + method: POST + action: + handler: relay_project_configs + locale: "--monolith--" + - match: + host: localhost + path: /api/0/relays/live/ + method: GET + action: + handler: health + locale: "--monolith--" + - match: + host: localhost + path: /api/0/relays/register/challenge/ + method: POST + action: + handler: register_challenge + locale: "--monolith--" + - match: + host: localhost + path: /api/0/relays/register/response/ + method: POST + action: + handler: register_response + locale: "--monolith--" + - match: + host: localhost + path: /api/0/relays/publickeys/ + method: POST + action: + handler: public_keys + locale: "--monolith--" + +metrics: + statsd_host: "127.0.0.1" + statsd_port: 8126 diff --git a/devservices/proxy.yaml b/devservices/proxy.yaml new file mode 100644 index 0000000..dcf1c4c --- /dev/null +++ b/devservices/proxy.yaml @@ -0,0 +1,36 @@ +proxy: + listener: + host: "0.0.0.0" + port: 3000 + admin_listener: + host: "0.0.0.0" + port: 3001 + locator: + type: in_process + control_plane: + url: http://host.docker.internal:8000 + backup_route_store: + type: filesystem + base_dir: /tmp/synapse-cache + filename: backup.bin + compression: zstd1 + localities: + - "--monolith--" + locality_to_default_cell: + "--monolith--": "--monolith--" + upstreams: + - name: sentry-dev-monolith + url: http://host.docker.internal:8000 + routes: + - match: + host: localhost + path: /organizations/{organization}/* + action: + resolver: cell_from_organization + cell_to_upstream: + "--monolith--": sentry-dev-monolith + # default: sentry-dev-monolith + +metrics: + statsd_host: "127.0.0.1" + statsd_port: 8126