template.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ---
  2. kind: compose
  3. metadata:
  4. icon:
  5. provider: selfh
  6. id: postgresql
  7. name: PostgreSQL
  8. description: 'PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development
  9. that has earned it a strong reputation 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: Swarm only supports ''bridge'' mode!
  55. '
  56. network_name:
  57. default: postgres_network
  58. network_external:
  59. type: bool
  60. default: false
  61. description: Whether the network is external
  62. swarm:
  63. vars:
  64. swarm_replicas:
  65. description: Number of replicas for Swarm mode
  66. type: int
  67. default: 1
  68. swarm_enabled:
  69. type: bool
  70. default: false
  71. description: Enable Docker Swarm mode
  72. swarm_placement_host:
  73. type: str
  74. default: ''
  75. description: The placement host
  76. swarm_placement_mode:
  77. type: str
  78. default: replicated
  79. description: The placement mode
  80. volume:
  81. vars:
  82. volume_mode:
  83. description: Volume mounting mode (local, mount, nfs)
  84. type: str
  85. default: local
  86. options:
  87. - local
  88. - mount
  89. - nfs
  90. volume_mount_path:
  91. description: Path for bind mounts when volume_mode is 'mount'
  92. type: str
  93. default: /var/lib/postgresql/data
  94. volume_nfs_server:
  95. description: NFS server address when volume_mode is 'nfs'
  96. type: str
  97. default: ''
  98. volume_nfs_path:
  99. description: NFS path when volume_mode is 'nfs'
  100. type: str
  101. default: ''
  102. volume_nfs_options:
  103. description: NFS mount options when volume_mode is 'nfs'
  104. type: str
  105. default: rw
  106. database:
  107. vars:
  108. database_port:
  109. type: int
  110. default: 5432
  111. required: true
  112. database_name:
  113. type: str
  114. required: true
  115. database_user:
  116. type: str
  117. required: true