|
| 1 | +# cspell: words statusgossip socat |
| 2 | + |
| 3 | +services: |
| 4 | + event-db: |
| 5 | + image: event-db:latest |
| 6 | + container_name: event-db |
| 7 | + environment: |
| 8 | + - DB_HOST=localhost |
| 9 | + - DB_PORT=5432 |
| 10 | + - DB_NAME=CatalystEventDev |
| 11 | + - DB_DESCRIPTION="Catalyst Event DB" |
| 12 | + - DB_SUPERUSER=postgres |
| 13 | + - DB_SUPERUSER_PASSWORD=postgres |
| 14 | + - DB_USER=catalyst-event-dev |
| 15 | + - DB_USER_PASSWORD=CHANGE_ME |
| 16 | + |
| 17 | + - INIT_AND_DROP_DB=true |
| 18 | + - WITH_MIGRATIONS=false |
| 19 | + ports: |
| 20 | + - 5432:5432 |
| 21 | + healthcheck: |
| 22 | + test: |
| 23 | + [ |
| 24 | + "CMD-SHELL", |
| 25 | + "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_PASSWORD}", |
| 26 | + ] |
| 27 | + interval: 10s |
| 28 | + timeout: 5s |
| 29 | + retries: 10 |
| 30 | + |
| 31 | + # runs old migrations for the separate `postgres` service |
| 32 | + # a special package for applying migrations only up to "V2_**" migrations |
| 33 | + event-db-v1-migrations: |
| 34 | + image: event-db:v1 |
| 35 | + container_name: event-db-v1-migrations |
| 36 | + environment: |
| 37 | + - DB_HOST=event-db |
| 38 | + - DB_PORT=5432 |
| 39 | + - DB_NAME=CatalystEventDev |
| 40 | + - DB_SUPERUSER=postgres |
| 41 | + - DB_SUPERUSER_PASSWORD=postgres |
| 42 | + - DB_USER=catalyst-event-dev |
| 43 | + - DB_USER_PASSWORD=CHANGE_ME |
| 44 | + |
| 45 | + - INIT_AND_DROP_DB=false |
| 46 | + - WITH_SEED_DATA=. |
| 47 | + - WITH_MIGRATIONS=true |
| 48 | + restart: "no" |
| 49 | + depends_on: |
| 50 | + event-db: |
| 51 | + condition: service_healthy |
| 52 | + |
| 53 | + # runs migrations for the separate `postgres` service |
| 54 | + event-db-migrations: |
| 55 | + image: event-db:latest |
| 56 | + container_name: event-db-migrations |
| 57 | + environment: |
| 58 | + - DB_HOST=event-db |
| 59 | + - DB_PORT=5432 |
| 60 | + - DB_NAME=CatalystEventDev |
| 61 | + - DB_SUPERUSER=postgres |
| 62 | + - DB_SUPERUSER_PASSWORD=postgres |
| 63 | + - DB_USER=catalyst-event-dev |
| 64 | + - DB_USER_PASSWORD=CHANGE_ME |
| 65 | + |
| 66 | + - INIT_AND_DROP_DB=false |
| 67 | + - WITH_SEED_DATA=. |
| 68 | + - WITH_MIGRATIONS=true |
| 69 | + restart: "no" |
| 70 | + depends_on: |
| 71 | + event-db-v1-migrations: |
| 72 | + condition: service_started |
| 73 | + |
| 74 | + scylla-node: |
| 75 | + image: scylladb/scylla:latest |
| 76 | + container_name: scylla-node |
| 77 | + restart: unless-stopped |
| 78 | + command: --smp 2 --memory 1G --overprovisioned 1 --api-address 0.0.0.0 |
| 79 | + ports: |
| 80 | + - 9042:9042 |
| 81 | + healthcheck: |
| 82 | + test: cqlsh -e "SHOW VERSION" || exit 1 |
| 83 | + interval: 15s |
| 84 | + timeout: 30s |
| 85 | + retries: 10 |
| 86 | + |
| 87 | + cat-gateway: |
| 88 | + image: cat-gateway:latest |
| 89 | + container_name: cat-gateway |
| 90 | + healthcheck: |
| 91 | + test: "curl -s -i localhost:3030/api/v1/health/started | head -n 1 | grep 204" |
| 92 | + start_period: 30s |
| 93 | + interval: 30s |
| 94 | + timeout: 30s |
| 95 | + # approximately a 25 minutes of waiting |
| 96 | + retries: 50 |
| 97 | + environment: |
| 98 | + - EVENT_DB_URL=postgres://catalyst-event-dev:CHANGE_ME@${EVENT_DB_URL:-event-db}/CatalystEventDev |
| 99 | + - CASSANDRA_PERSISTENT_URL=${INDEX_DB_URL:-scylla-node:9042} |
| 100 | + - CASSANDRA_VOLATILE_URL=${INDEX_DB_URL:-scylla-node:9042} |
| 101 | + - CHAIN_NETWORK=${ENV_TARGET:-Preprod} |
| 102 | + - INTERNAL_API_KEY=123 |
| 103 | + - YES_I_REALLY_WANT_TO_PANIC=panic attack |
| 104 | + - SERVICE_LIVE_COUNTER_THRESHOLD=100 |
| 105 | + - SERVICE_LIVE_TIMEOUT_INTERVAL=30 |
| 106 | + - OTEL_EXPORTER_OTLP_ENDPOINT=http://192.168.1.125:4317 |
| 107 | + - OTEL_SERVICE_NAME=cat-gateway |
| 108 | + - RUST_LOG=info,catalyst_gateway=debug |
| 109 | + - TELEMETRY_ENABLED=true |
| 110 | + # - LOG_LEVEL=error |
| 111 | + # - RUST_LOG="error,cat_gateway=debug,cardano_chain_follower=debug,mithril-client=debug" |
| 112 | + ports: |
| 113 | + - 3030:3030 |
| 114 | + depends_on: |
| 115 | + event-db-migrations: |
| 116 | + condition: service_started |
| 117 | + scylla-node: |
| 118 | + condition: service_healthy |
| 119 | + jaeger: |
| 120 | + condition: service_started |
| 121 | + prometheus: |
| 122 | + condition: service_started |
| 123 | + |
| 124 | + # Jaeger (visualization and storage backend) |
| 125 | + jaeger: |
| 126 | + image: jaegertracing/jaeger:2.12.0 |
| 127 | + container_name: jaeger |
| 128 | + environment: |
| 129 | + - COLLECTOR_OTLP_ENABLED=true |
| 130 | + volumes: |
| 131 | + - ./jaeger.config.yaml:/jaeger/config.yaml |
| 132 | + ports: |
| 133 | + - "16685:16685" # gRPC UI |
| 134 | + - "16686:16686" # Web UI |
| 135 | + - "4317:4317" # OTLP gRPC receiver |
| 136 | + - "4318:4318" # OTLP HTTP receiver |
| 137 | + - "8888:8888" # OTLP Metrics exporter endpoint |
| 138 | + command: "--config /jaeger/config.yaml" |
| 139 | + |
| 140 | + prometheus: |
| 141 | + image: prom/prometheus:latest |
| 142 | + container_name: prometheus |
| 143 | + volumes: |
| 144 | + - ./prometheus.yml:/etc/prometheus/prometheus.yml |
| 145 | + ports: |
| 146 | + - "9090:9090" |
0 commit comments