docker-compose-testing.yml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. x-restart-policy: &restart_policy
  2. restart: unless-stopped
  3. x-depends_on-healthy: &depends_on-healthy
  4. condition: service_healthy
  5. x-depends_on-default: &depends_on-default
  6. condition: service_started
  7. x-healthcheck-defaults: &healthcheck_defaults
  8. interval: 30s
  9. timeout: 1m30s
  10. retries: 10
  11. start_period: 10s
  12. services:
  13. redis:
  14. <<: *restart_policy
  15. container_name: sentry_redis
  16. image: ghcr.io/getsentry/image-mirror-library-redis:5.0-alpine
  17. healthcheck:
  18. <<: *healthcheck_defaults
  19. test: redis-cli ping
  20. command:
  21. [
  22. 'redis-server',
  23. '--appendonly',
  24. 'yes',
  25. '--save',
  26. '60',
  27. '20',
  28. '--auto-aof-rewrite-percentage',
  29. '100',
  30. '--auto-aof-rewrite-min-size',
  31. '64mb',
  32. ]
  33. volumes:
  34. - 'sentry-redis:/data'
  35. ports:
  36. - '6379:6379'
  37. networks:
  38. - sentry
  39. extra_hosts:
  40. host.docker.internal: host-gateway
  41. postgres:
  42. <<: *restart_policy
  43. container_name: sentry_postgres
  44. # Using the same postgres version as Sentry dev for consistency purposes
  45. image: 'ghcr.io/getsentry/image-mirror-library-postgres:14-alpine'
  46. healthcheck:
  47. <<: *healthcheck_defaults
  48. # Using default user "postgres" from sentry/sentry.conf.example.py or value of POSTGRES_USER if provided
  49. test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-postgres}']
  50. 'command':
  51. [
  52. 'postgres',
  53. '-c',
  54. 'wal_level=logical',
  55. '-c',
  56. 'max_replication_slots=1',
  57. '-c',
  58. 'max_wal_senders=1',
  59. ]
  60. environment:
  61. POSTGRES_HOST_AUTH_METHOD: 'trust'
  62. POSTGRES_DB: 'sentry'
  63. volumes:
  64. - 'sentry-postgres:/var/lib/postgresql/data'
  65. ports:
  66. - '5432:5432'
  67. networks:
  68. - sentry
  69. extra_hosts:
  70. host.docker.internal: host-gateway
  71. kafka:
  72. <<: *restart_policy
  73. image: 'ghcr.io/getsentry/image-mirror-confluentinc-cp-kafka:7.5.0'
  74. container_name: sentry_kafka
  75. environment:
  76. # https://docs.confluent.io/platform/current/installation/docker/config-reference.html#cp-kakfa-example
  77. KAFKA_PROCESS_ROLES: 'broker,controller'
  78. KAFKA_CONTROLLER_QUORUM_VOTERS: '1@127.0.0.1:29093'
  79. KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
  80. KAFKA_NODE_ID: '1'
  81. CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
  82. KAFKA_LISTENERS: 'PLAINTEXT://0.0.0.0:29092,INTERNAL://0.0.0.0:9093,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:29093'
  83. KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://127.0.0.1:29092,INTERNAL://kafka:9093,EXTERNAL://127.0.0.1:9092'
  84. KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT'
  85. KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
  86. KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: '1'
  87. KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: '1'
  88. KAFKA_LOG_RETENTION_HOURS: '24'
  89. KAFKA_MESSAGE_MAX_BYTES: '50000000' #50MB or bust
  90. KAFKA_MAX_REQUEST_SIZE: '50000000' #50MB on requests apparently too
  91. volumes:
  92. - 'sentry-kafka:/var/lib/kafka/data'
  93. - 'sentry-kafka-log:/var/lib/kafka/log'
  94. healthcheck:
  95. <<: *healthcheck_defaults
  96. test: ['CMD-SHELL', 'nc -z localhost 9092']
  97. interval: 10s
  98. timeout: 10s
  99. retries: 30
  100. ports:
  101. - '9092:9092'
  102. - '9093:9093'
  103. networks:
  104. - sentry
  105. extra_hosts:
  106. host.docker.internal: host-gateway
  107. clickhouse:
  108. <<: *restart_policy
  109. container_name: sentry_clickhouse
  110. image: 'ghcr.io/getsentry/image-mirror-altinity-clickhouse-server:23.3.19.33.altinitystable'
  111. ulimits:
  112. nofile:
  113. soft: 262144
  114. hard: 262144
  115. volumes:
  116. - 'sentry-clickhouse:/var/lib/clickhouse'
  117. - 'sentry-clickhouse-log:/var/log/clickhouse-server'
  118. - type: bind
  119. read_only: true
  120. source: ./clickhouse/config.xml
  121. target: /etc/clickhouse-server/config.d/sentry.xml
  122. healthcheck:
  123. test: [
  124. 'CMD-SHELL',
  125. # Manually override any http_proxy envvar that might be set, because
  126. # this wget does not support no_proxy. See:
  127. # https://github.com/getsentry/self-hosted/issues/1537
  128. "http_proxy='' wget -nv -t1 --spider 'http://localhost:8123/' || exit 1",
  129. ]
  130. interval: 10s
  131. timeout: 10s
  132. retries: 30
  133. ports:
  134. - '8123:8123'
  135. - '9000:9000'
  136. - '9009:9009'
  137. networks:
  138. - sentry
  139. extra_hosts:
  140. host.docker.internal: host-gateway
  141. symbolicator:
  142. <<: *restart_policy
  143. container_name: sentry_symbolicator
  144. image: 'us-central1-docker.pkg.dev/sentryio/symbolicator/image:nightly'
  145. volumes:
  146. - 'sentry-symbolicator:/data'
  147. - type: bind
  148. read_only: true
  149. source: ./symbolicator
  150. target: /etc/symbolicator
  151. command: run -c /etc/symbolicator/config.yml
  152. ports:
  153. - '3021:3021'
  154. networks:
  155. - sentry
  156. extra_hosts:
  157. host.docker.internal: host-gateway
  158. vroom:
  159. <<: *restart_policy
  160. container_name: sentry_vroom
  161. image: 'us-central1-docker.pkg.dev/sentryio/vroom/vroom:latest'
  162. environment:
  163. SENTRY_KAFKA_BROKERS_PROFILING: 'sentry_kafka:9092'
  164. SENTRY_KAFKA_BROKERS_OCCURRENCES: 'sentry_kafka:9092'
  165. SENTRY_BUCKET_PROFILES: file://localhost//var/lib/sentry-profiles
  166. SENTRY_SNUBA_HOST: 'http://snuba-api:1218'
  167. volumes:
  168. - sentry-vroom:/var/lib/sentry-profiles
  169. depends_on:
  170. kafka:
  171. <<: *depends_on-healthy
  172. ports:
  173. - '8085:8085'
  174. networks:
  175. - sentry
  176. extra_hosts:
  177. host.docker.internal: host-gateway
  178. snuba:
  179. <<: *restart_policy
  180. container_name: sentry_snuba
  181. image: ghcr.io/getsentry/snuba:latest
  182. ports:
  183. - '1218:1218'
  184. - '1219:1219'
  185. networks:
  186. - sentry
  187. command: ['devserver']
  188. environment:
  189. PYTHONUNBUFFERED: '1'
  190. SNUBA_SETTINGS: docker
  191. DEBUG: '1'
  192. CLICKHOUSE_HOST: 'clickhouse'
  193. CLICKHOUSE_PORT: '9000'
  194. CLICKHOUSE_HTTP_PORT: '8123'
  195. DEFAULT_BROKERS: 'kafka:9093'
  196. REDIS_HOST: 'redis'
  197. REDIS_PORT: '6379'
  198. REDIS_DB: '1'
  199. ENABLE_SENTRY_METRICS_DEV: '${ENABLE_SENTRY_METRICS_DEV:-}'
  200. ENABLE_PROFILES_CONSUMER: '${ENABLE_PROFILES_CONSUMER:-}'
  201. ENABLE_SPANS_CONSUMER: '${ENABLE_SPANS_CONSUMER:-}'
  202. ENABLE_ISSUE_OCCURRENCE_CONSUMER: '${ENABLE_ISSUE_OCCURRENCE_CONSUMER:-}'
  203. ENABLE_AUTORUN_MIGRATION_SEARCH_ISSUES: '1'
  204. ENABLE_GROUP_ATTRIBUTES_CONSUMER: '${ENABLE_GROUP_ATTRIBUTES_CONSUMER:-}'
  205. platform: linux/amd64
  206. depends_on:
  207. - kafka
  208. - redis
  209. - clickhouse
  210. extra_hosts:
  211. host.docker.internal: host-gateway
  212. bigtable:
  213. <<: *restart_policy
  214. container_name: sentry_bigtable
  215. image: 'us.gcr.io/sentryio/cbtemulator:23c02d92c7a1747068eb1fc57dddbad23907d614'
  216. ports:
  217. - '8086:8086'
  218. networks:
  219. - sentry
  220. extra_hosts:
  221. host.docker.internal: host-gateway
  222. redis-cluster:
  223. <<: *restart_policy
  224. container_name: sentry_redis-cluster
  225. image: ghcr.io/getsentry/docker-redis-cluster:7.0.10
  226. ports:
  227. - '7000:7000'
  228. - '7001:7001'
  229. - '7002:7002'
  230. - '7003:7003'
  231. - '7004:7004'
  232. - '7005:7005'
  233. networks:
  234. - sentry
  235. volumes:
  236. - sentry-redis-cluster:/redis-data
  237. environment:
  238. - IP=0.0.0.0
  239. chartcuterie:
  240. <<: *restart_policy
  241. container_name: sentry_chartcuterie
  242. image: 'us-central1-docker.pkg.dev/sentryio/chartcuterie/image:latest'
  243. environment:
  244. CHARTCUTERIE_CONFIG: /etc/chartcuterie/config.js
  245. CHARTCUTERIE_CONFIG_POLLING: true
  246. volumes:
  247. - ./chartcuterie:/etc/chartcuterie
  248. ports:
  249. - '7901:9090'
  250. networks:
  251. - sentry
  252. extra_hosts:
  253. host.docker.internal: host-gateway
  254. healthcheck:
  255. <<: *healthcheck_defaults
  256. # Using default user "postgres" from sentry/sentry.conf.example.py or value of POSTGRES_USER if provided
  257. test:
  258. [
  259. 'CMD-SHELL',
  260. 'docker exec sentry_chartcuterie python3 -c "import urllib.request; urllib.request.urlopen(\"http://127.0.0.1:9090/api/chartcuterie/healthcheck/live\", timeout=5)"',
  261. ]
  262. volumes:
  263. # These store application data that should persist across restarts.
  264. sentry-data:
  265. sentry-postgres:
  266. sentry-redis:
  267. sentry-redis-cluster:
  268. sentry-kafka:
  269. sentry-clickhouse:
  270. sentry-symbolicator:
  271. # This volume stores profiles and should be persisted.
  272. # Not being external will still persist data across restarts.
  273. # It won't persist if someone does a docker compose down -v.
  274. sentry-vroom:
  275. sentry-kafka-log:
  276. sentry-clickhouse-log:
  277. networks:
  278. sentry:
  279. name: sentry
  280. external: true