template.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ---
  2. kind: compose
  3. metadata:
  4. icon:
  5. provider: selfh
  6. id: postgresql
  7. name: PostgreSQL
  8. description: >
  9. PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development
  10. that has earned it a strong reputation for reliability, feature robustness, and performance.
  11. Project: https://www.postgresql.org/
  12. Documentation: https://www.postgresql.org/docs/
  13. GitHub: https://github.com/postgres/postgres
  14. version: 18.1
  15. author: Christian Lempa
  16. date: '2025-12-11'
  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. ports:
  29. vars:
  30. ports_postgres:
  31. description: PostgreSQL port
  32. type: int
  33. default: 5432
  34. traefik:
  35. vars:
  36. traefik_host:
  37. default: "postgres"
  38. network:
  39. vars:
  40. network_mode:
  41. extra: >
  42. Use 'host' mode if you need to bind directly to port 5432.
  43. NOTE: Swarm only supports 'bridge' mode!
  44. network_name:
  45. default: "postgres_network"
  46. swarm:
  47. vars:
  48. swarm_replicas:
  49. description: Number of replicas for Swarm mode
  50. type: int
  51. default: 1
  52. volume:
  53. vars:
  54. volume_mode:
  55. description: Volume mounting mode (local, mount, nfs)
  56. type: str
  57. default: "local"
  58. options:
  59. - local
  60. - mount
  61. - nfs
  62. volume_mount_path:
  63. description: Path for bind mounts when volume_mode is 'mount'
  64. type: str
  65. default: "/var/lib/postgresql/data"
  66. volume_nfs_server:
  67. description: NFS server address when volume_mode is 'nfs'
  68. type: str
  69. default: ""
  70. volume_nfs_path:
  71. description: NFS path when volume_mode is 'nfs'
  72. type: str
  73. default: ""
  74. volume_nfs_options:
  75. description: NFS mount options when volume_mode is 'nfs'
  76. type: str
  77. default: "rw"