Skip to content

vontikov/pgcluster

Repository files navigation

pgcluster

High available PostgreSQL cluster.

Overview

Cluster components - PostgreSQL and monitoring agent - are delivered in a single Docker image.

The monitoring agent uses distributed key-value store for leader election and tracking cluster state.

The following key-value stores may be used with the cluster:

The image exposes two ports:

  • 5432 - PostgreSQL
  • 3501 - monitoring and management

Build

# Staged build
make image-staged
# Local build (requires local Go installation)
make image

Running examples

With etcd:

docker-compose -f examples/docker-compose-etcd.yaml up

With Stoa:

docker-compose -f examples/docker-compose-stoa.yaml up