docker-compose-dbs.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. version: '2'
  2. services:
  3. pg-master:
  4. image: 'docker.finogeeks.club/finochat/dendrite-db'
  5. #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'
  6. extra_hosts:
  7. - "redis:10.135.100.208"
  8. environment:
  9. POSTGRES_USER: 'postgres'
  10. POSTGRES_PASSWORD: 'postgres'
  11. POSTGRES_DB: 'postgres'
  12. PGDATA: '/var/lib/postgresql/data'
  13. REDIS_SERVER: 'redis'
  14. #network_mode: host
  15. volumes:
  16. - /mnt/data/dendrite/pg-master/data:/var/lib/postgresql/data
  17. pg-slave:
  18. image: 'docker.finogeeks.club/finochat/dendrite-db'
  19. #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'
  20. environment:
  21. POSTGRES_USER: 'postgres'
  22. POSTGRES_PASSWORD: 'postgres'
  23. POSTGRES_DB: 'postgres'
  24. PGDATA: '/var/lib/postgresql/data'
  25. REPLICATE_FROM: 'pg-master'
  26. depends_on:
  27. - pg-master
  28. volumes:
  29. - /mnt/data/dendrite/pg-slave/data:/var/lib/postgresql/data
  30. links:
  31. - 'pg-master'
  32. pg-pool:
  33. image: 'docker.finogeeks.club/finochat/pgpool'
  34. environment:
  35. PG_PRIMARY_SERVICE_NAME: 'pg-master'
  36. PG_REPLICA_SERVICE_NAME: 'pg-slave'
  37. PG_USERNAME: 'dendrite'
  38. PG_PASSWORD: 'finochat'
  39. #PG_DATABASE: 'dendrite_roomserver'
  40. depends_on:
  41. - pg-master
  42. - pg-slave
  43. ports:
  44. - 15432:5432
  45. links:
  46. - 'pg-master'
  47. - 'pg-slave'