template.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. kind: compose
  2. metadata:
  3. icon:
  4. provider: selfh
  5. id: postgresql
  6. name: PostgreSQL
  7. description: 'PostgreSQL is a powerful, open source object-relational database system
  8. with over 30 years of active development that has earned it a strong reputation
  9. for reliability, feature robustness, and performance.
  10. Project: https://www.postgresql.org/
  11. Documentation: https://www.postgresql.org/docs/
  12. GitHub: https://github.com/postgres/postgres
  13. '
  14. version: 18.2
  15. author: Christian Lempa
  16. date: '2026-02-13'
  17. tags:
  18. - swarm
  19. draft: true
  20. schema: '1.2'
  21. spec:
  22. general:
  23. vars:
  24. service_name:
  25. default: postgres
  26. container_name:
  27. default: postgres
  28. container_hostname:
  29. type: str
  30. container_timezone:
  31. type: str
  32. restart_policy:
  33. type: enum
  34. options:
  35. - unless-stopped
  36. - always
  37. - on-failure
  38. - 'no'
  39. default: unless-stopped
  40. required: true
  41. ports:
  42. vars:
  43. ports_postgres:
  44. description: PostgreSQL port
  45. type: int
  46. default: 5432
  47. traefik:
  48. vars:
  49. traefik_host:
  50. default: postgres
  51. network:
  52. vars:
  53. network_mode:
  54. extra: 'Use ''host'' mode if you need to bind directly to port 5432. NOTE:
  55. Swarm only supports ''bridge'' mode!
  56. '
  57. network_name:
  58. default: postgres_network
  59. network_external:
  60. type: bool
  61. default: false
  62. description: Whether the network is external
  63. swarm:
  64. vars:
  65. swarm_replicas:
  66. description: Number of replicas for Swarm mode
  67. type: int
  68. default: 1
  69. swarm_enabled:
  70. type: bool
  71. default: false
  72. description: Enable Docker Swarm mode
  73. swarm_placement_host:
  74. type: str
  75. default: ''
  76. description: The placement host
  77. swarm_placement_mode:
  78. type: str
  79. default: replicated
  80. description: The placement mode
  81. toggle: swarm_enabled
  82. title: Docker Swarm
  83. description: Configure Docker Swarm mode deployment
  84. volume:
  85. vars:
  86. volume_mode:
  87. description: Volume mounting mode (local, mount, nfs)
  88. type: str
  89. default: local
  90. options:
  91. - local
  92. - mount
  93. - nfs
  94. volume_mount_path:
  95. description: Path for bind mounts when volume_mode is 'mount'
  96. type: str
  97. default: /var/lib/postgresql/data
  98. volume_nfs_server:
  99. description: NFS server address when volume_mode is 'nfs'
  100. type: str
  101. default: ''
  102. volume_nfs_path:
  103. description: NFS path when volume_mode is 'nfs'
  104. type: str
  105. default: ''
  106. volume_nfs_options:
  107. description: NFS mount options when volume_mode is 'nfs'
  108. type: str
  109. default: rw
  110. database:
  111. vars:
  112. database_port:
  113. type: int
  114. default: 5432
  115. required: true
  116. database_name:
  117. type: str
  118. required: true
  119. database_user:
  120. type: str
  121. required: true