An open API service indexing awesome lists of open source software.

https://github.com/ccakes/nomad-pgsql-patroni

Simple container for running Postgres HA on Nomad
https://github.com/ccakes/nomad-pgsql-patroni

Last synced: 5 months ago
JSON representation

Simple container for running Postgres HA on Nomad

Awesome Lists containing this project

README

          

# nomad-pgsql-patroni

A simple container running Postgres and Patroni useful for dropping directly into a Hashicorp environment (Nomad + Consul + Vault)

It also comes pre-baked with some tools and extensions

### Tools

| Name | Version | Link |
|--|--|--|
| awscli | 1.22.64 | https://pypi.org/project/awscli/ |
| WAL-G | 2.0.1 | https://github.com/wal-g/wal-g |
| Patroni | 3.0.0 | https://github.com/zalando/patroni |
| vaultenv | 0.15.1 | https://github.com/channable/vaultenv |

### Extensions

| Name | Version | Link |
|--|--|--|
| Timescale | 2.13.1 | https://www.timescale.com |
| PostGIS | 3.4.1 | https://postgis.net |
| pg_cron | 1.6 | https://github.com/citusdata/pg_cron |
| pg_idkit | 0.2.1 | https://github.com/VADOSWARE/pg_idkit |
| pgRouting | 3.6.1 | https://pgrouting.org |
| postgres-json-schema | 0.1.1 | https://github.com/gavinwahl/postgres-json-schema |
| vector | 0.5.1 | https://github.com/ankane/pgvector |

### Still running an older Postgres version?

These branches are *mostly* supported containing older versions. If I get behind on a point release feel free to raise an issue :thumbsup:

- [`pg-14`](https://github.com/ccakes/nomad-pgsql-patroni/tree/pg-14)
- [`pg-13`](https://github.com/ccakes/nomad-pgsql-patroni/tree/pg-13)
- [`pg-12`](https://github.com/ccakes/nomad-pgsql-patroni/tree/pg-12)

## Usage

```hcl
job "postgres-16" {
type = "service"
datacenters = ["dc1"]

group "group" {
count = 1

network {
port api { to = 8080 }
port pg { to = 5432 }
}

task "db" {
driver = "docker"

template {
data = <