docker-compose-dev.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. version: '2'
  2. services:
  3. zookeeper:
  4. container_name: dendrite_zk
  5. hostname: localhost
  6. image: 'docker.finogeeks.club/finochat/zookeeper'
  7. kafka:
  8. container_name: dendrite_kafka
  9. hostname: localhost
  10. image: 'docker.finogeeks.club/finochat/kafka'
  11. ports:
  12. - 9092:9092
  13. environment:
  14. KAFKA_ADVERTISED_HOST_NAME: "kafka"
  15. KAFKA_DELETE_TOPIC_ENABLE: "true"
  16. KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
  17. depends_on:
  18. - zookeeper
  19. links:
  20. - 'zookeeper'
  21. redis:
  22. image: 'docker.finogeeks.club/finochat/dendrite-redis'
  23. ports:
  24. - 6379:6379
  25. #volumes:
  26. #- /root/dendrite/db:/data
  27. #- /Users/taoruifu/work/fino/chat/dendrite/db:/data
  28. #- /Users/huguanrui/git/src/github.com/matrix-org/dendrite/db:/data
  29. #- /Users/teril/GolandProjects/finochat/dendrite/db:/data
  30. #- /Users/fadeace/GolandProjects/dendrite/db:/data
  31. #- /Users/tom/Documents/dendrite/db:/opt/redis/data
  32. #- /Users/huguanrui/git/src/github.com/matrix-org/dendrite/db:/data
  33. pg-master:
  34. image: 'docker.finogeeks.club/finochat/dendrite-db'
  35. #command: 'postgres -c max_connections=1000 -c shared_buffers=2048MB -c temp_buffers=1024MB -c work_mem=128MB -c maintenance_work_mem=1024MB -c fsync=off -c commit_delay=10 -c commit_siblings=100 -c max_wal_size=4GB'
  36. environment:
  37. POSTGRES_USER: 'postgres'
  38. POSTGRES_PASSWORD: 'postgres'
  39. POSTGRES_DB: 'postgres'
  40. PGDATA: '/var/lib/postgresql/data'
  41. REDIS_SERVER: 'redis'
  42. #network_mode: host
  43. depends_on:
  44. - redis
  45. #ports:
  46. #- 15432:5432
  47. links:
  48. - 'redis'
  49. pg-slave:
  50. image: 'docker.finogeeks.club/finochat/dendrite-db'
  51. #command: 'postgres -c max_connections=1000 -c shared_buffers=2048MB -c temp_buffers=1024MB -c work_mem=128MB -c maintenance_work_mem=1024MB -c fsync=off -c commit_delay=10 -c commit_siblings=100 -c max_wal_size=4GB'
  52. environment:
  53. POSTGRES_USER: 'postgres'
  54. POSTGRES_PASSWORD: 'postgres'
  55. POSTGRES_DB: 'postgres'
  56. PGDATA: '/var/lib/postgresql/data'
  57. REPLICATE_FROM: 'pg-master'
  58. depends_on:
  59. - pg-master
  60. #ports:
  61. #- 15431:5432
  62. links:
  63. - 'pg-master'
  64. pg-pool:
  65. image: 'docker.finogeeks.club/finochat/pgpool'
  66. environment:
  67. PG_PRIMARY_SERVICE_NAME: 'pg-master'
  68. PG_REPLICA_SERVICE_NAME: 'pg-slave'
  69. PG_USERNAME: 'dendrite'
  70. PG_PASSWORD: 'finochat'
  71. #PG_DATABASE: 'dendrite_roomserver'
  72. depends_on:
  73. - pg-master
  74. - pg-slave
  75. ports:
  76. - 15432:5432
  77. volumes:
  78. - ./config/pgpool.conf:/pgconf/pgpoolconfigdir/pgpool.conf
  79. - ./config/pool_hba.conf:/pgconf/pgpoolconfigdir/pool_hba.conf
  80. - ./config/pool_passwd:/pgconf/pgpoolconfigdir/pool_passwd
  81. links:
  82. - 'pg-master'
  83. dendrite:
  84. image: docker.finogeeks.club/finochat/dendrite
  85. ports:
  86. - 8008:8008
  87. - 8448:8448
  88. environment:
  89. CFG: "test"
  90. # volumes:
  91. # - /root/dendrite/log:/opt/dendrite/log
  92. depends_on:
  93. - pg-master
  94. - kafka
  95. - zookeeper
  96. links:
  97. - 'pg-master'
  98. - 'kafka'
  99. - 'zookeeper'