Guest User

Untitled

a guest
Dec 19th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. version: '3.5'
  2.  
  3. networks:
  4. plannerix:
  5. name: plannerix
  6. external: true
  7.  
  8. services:
  9. primary:
  10. hostname: 'primary'
  11. image: crunchydata/crunchy-postgres:centos7-9.6.11-2.2.0
  12. environment:
  13. - PGHOST=/tmp
  14. - MAX_CONNECTIONS=10
  15. - MAX_WAL_SENDERS=5
  16. - PG_MODE=primary
  17. - PG_PRIMARY_USER=primaryuser
  18. - PG_PRIMARY_PASSWORD=fRqz3vxPpGWSaFSdSGmC
  19. - PG_DATABASE=testdb
  20. - PG_USER=sye1zhudcauyoei
  21. - PG_PASSWORD=cUSC9f0FYSkT2iKWGdEjYXONcQVyYLrhrgpQIkFNCwQ1uFv7go4DU6vEo9iAYd
  22. - PG_ROOT_PASSWORD=Pje5SXan7qHa9LFL3nmYCUBgwR6EHtF6K4qKnvfd
  23. - PG_PRIMARY_PORT=5432
  24. volumes:
  25. - pg-primary-vol:/pgdata
  26. ports:
  27. - "5432"
  28. networks:
  29. - plannerix
  30. deploy:
  31. restart_policy:
  32. condition: on-failure
  33. delay: 10s
  34. max_attempts: 4
  35. window: 300s
  36. placement:
  37. constraints:
  38. - node.labels.type == db
  39. - node.labels.db == primary
  40. - node.labels.type != api
  41. - node.role == worker
  42.  
  43. replica:
  44. image: crunchydata/crunchy-postgres:centos7-9.6.11-2.2.0
  45. environment:
  46. - PGHOST=/tmp
  47. - MAX_CONNECTIONS=10
  48. - MAX_WAL_SENDERS=5
  49. - PG_MODE=replica
  50. - PG_PRIMARY_HOST=primary
  51. - PG_PRIMARY_PORT=5432
  52. - PG_PRIMARY_USER=primaryuser
  53. - PG_PRIMARY_PASSWORD=fRqz3vxPpGWSaFSdSGmC
  54. - PG_DATABASE=testdb
  55. - PG_USER=testuser
  56. - PG_PASSWORD=password
  57. - PG_ROOT_PASSWORD=Pje5SXan7qHa9LFL3nmYCUBgwR6EHtF6K4qKnvfd
  58. volumes:
  59. - pg-replica-vol:/pgdata
  60. ports:
  61. - "5432"
  62. networks:
  63. - plannerix
  64. deploy:
  65. restart_policy:
  66. condition: on-failure
  67. delay: 10s
  68. max_attempts: 4
  69. window: 300s
  70. placement:
  71. constraints:
  72. - node.labels.type == db
  73. - node.labels.type != primary
  74. - node.role == worker
  75. depends_on:
  76. - pg-primary
  77.  
  78. volumes:
  79. pg-primary-vol:
  80. pg-replica-vol:
Add Comment
Please, Sign In to add comment