docker-compose.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. services:
  2. archive_db:
  3. container_name: orion_archive_db
  4. hostname: orion_archive_db
  5. image: postgres:14 # CockroachDB cluster might be a better fit for production deployment
  6. restart: unless-stopped
  7. volumes:
  8. - orion_archive_db_data:/var/lib/postgresql/data
  9. environment:
  10. POSTGRES_USER: postgres
  11. POSTGRES_PASSWORD: postgres
  12. POSTGRES_DB: squid-archive
  13. ports:
  14. - '127.0.0.1:${DB_PORT}:${DB_PORT}'
  15. - '[::1]:${DB_PORT}:${DB_PORT}'
  16. command: ['postgres', '-c', 'log_statement=all', '-p', '${DB_PORT}']
  17. ingest:
  18. container_name: orion_archive_ingest
  19. depends_on:
  20. - archive_db
  21. restart: unless-stopped
  22. image: subsquid/substrate-ingest:firesquid
  23. command: [
  24. '-e',
  25. '${WS_SOURCE}',
  26. '-c',
  27. '20', # allow up to 20 pending requests for the above endpoint (default is 5)
  28. # "--start-block", "1000000", # uncomment to specify a non-zero start block
  29. '--out',
  30. 'postgres://postgres:postgres@orion_archive_db:${DB_PORT}/squid-archive',
  31. ]
  32. gateway:
  33. container_name: orion_archive_gateway
  34. hostname: orion_archive_gateway
  35. depends_on:
  36. - archive_db
  37. restart: unless-stopped
  38. image: subsquid/substrate-gateway:firesquid
  39. environment:
  40. DATABASE_MAX_CONNECTIONS: 5
  41. RUST_LOG: 'actix_web=info,actix_server=info'
  42. command: [
  43. '--database-url',
  44. 'postgres://postgres:postgres@orion_archive_db:${DB_PORT}/squid-archive',
  45. # "--evm-support" # uncomment for chains with Frontier EVM pallet
  46. # (e.g. Moonbeam/Moonriver or Astar/Shiden)
  47. ]
  48. ports:
  49. - '127.0.0.1:${GATEWAY_PORT}:8000'
  50. - '[::1]:${GATEWAY_PORT}:8000'
  51. # Explorer service is optional.
  52. # It provides rich GraphQL API for querying archived data.
  53. # Many developers find it very useful for exploration and debugging.
  54. explorer:
  55. container_name: orion_archive_explorer
  56. hostname: orion_archive_explorer
  57. restart: unless-stopped
  58. image: subsquid/substrate-explorer:firesquid
  59. environment:
  60. DB_TYPE: postgres # set to `cockroach` for Cockroach DB
  61. DB_HOST: archive_db
  62. DB_NAME: 'squid-archive'
  63. DB_USER: 'postgres'
  64. DB_PASS: 'postgres'
  65. ports:
  66. - '${EXPLORER_PORT}:3000'
  67. networks:
  68. default:
  69. external:
  70. name: joystream_default
  71. volumes:
  72. orion_archive_db_data: