docker-compose.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. version: "3.4"
  2. services:
  3. db:
  4. image: postgres:12
  5. restart: always
  6. ports:
  7. - "${DB_PORT}:5432"
  8. volumes:
  9. - /var/lib/postgresql/data
  10. environment:
  11. POSTGRES_USER: ${DB_USER}
  12. POSTGRES_PASSWORD: ${DB_PASS}
  13. POSTGRES_DB: ${DB_NAME}
  14. graphql-server:
  15. image: joystream/apps
  16. restart: unless-stopped
  17. build:
  18. context: ../
  19. dockerfile: apps.Dockerfile
  20. env_file:
  21. - .env
  22. environment:
  23. - DB_HOST=db
  24. ports:
  25. - "8080:${GRAPHQL_SERVER_PORT}"
  26. depends_on:
  27. - db
  28. command: ["workspace", "query-node-root", "server:start:prod"]
  29. processor:
  30. image: joystream/apps
  31. restart: unless-stopped
  32. build:
  33. context: ../
  34. dockerfile: apps.Dockerfile
  35. env_file:
  36. - .env
  37. environment:
  38. - INDEXER_ENDPOINT_URL=http://indexer-api-gateway:4000/graphql
  39. - DB_HOST=db
  40. - TYPEORM_HOST=db
  41. - DEBUG=index-builder:*
  42. depends_on:
  43. - indexer-api-gateway
  44. command: ["workspace", "query-node-root", "processor:start"]
  45. indexer:
  46. image: joystream/apps
  47. restart: unless-stopped
  48. build:
  49. context: ../
  50. dockerfile: apps.Dockerfile
  51. env_file:
  52. - .env
  53. environment:
  54. - TYPEORM_HOST=db
  55. - INDEXER_WORKERS=5
  56. - PROCESSOR_POLL_INTERVAL=1000 # refresh every second
  57. - REDIS_URI=redis://redis:6379/0
  58. - DEBUG=index-builder:*
  59. depends_on:
  60. - db
  61. command: ["workspace", "query-node-root", "indexer:start"]
  62. indexer-api-gateway:
  63. image: joystream/hydra-indexer-gateway:latest
  64. restart: unless-stopped
  65. environment:
  66. - WARTHOG_STARTER_DB_DATABASE=${DB_NAME}
  67. - WARTHOG_STARTER_DB_HOST=db
  68. - WARTHOG_STARTER_DB_PASSWORD=${DB_PASS}
  69. - WARTHOG_STARTER_DB_PORT=${DB_PORT}
  70. - WARTHOG_STARTER_DB_USERNAME=${DB_USER}
  71. - WARTHOG_STARTER_REDIS_URI=redis://redis:6379/0
  72. - PORT=4000
  73. ports:
  74. - "4000:4000"
  75. depends_on:
  76. - redis
  77. - db
  78. # - indexer
  79. redis:
  80. image: redis:6.0-alpine
  81. restart: always
  82. ports:
  83. - "6379:6379"