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. spec:
  21. general:
  22. vars:
  23. service_name:
  24. default: "postgres"
  25. container_name:
  26. default: "postgres"
  27. ports:
  28. vars:
  29. ports_postgres:
  30. description: PostgreSQL port
  31. type: int
  32. default: 5432
  33. traefik:
  34. vars:
  35. traefik_host:
  36. default: "postgres"
  37. network:
  38. vars:
  39. network_mode:
  40. extra: >
  41. Use 'host' mode if you need to bind directly to port 5432.
  42. NOTE: Swarm only supports 'bridge' mode!
  43. network_name:
  44. default: "postgres_network"
  45. swarm:
  46. vars:
  47. swarm_replicas:
  48. description: Number of replicas for Swarm mode
  49. type: int
  50. default: 1
  51. volume:
  52. vars:
  53. volume_mode:
  54. description: Volume mounting mode (local, mount, nfs)
  55. type: str
  56. default: "local"
  57. config:
  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"