This commit implements a massive refactor of the repository, and moves the build system over to use Mage (magefile.org) which should allow seamless building across multiple platforms.
33 lines
691 B
YAML
33 lines
691 B
YAML
|
|
version: '2'
|
|
|
|
services:
|
|
pg-master:
|
|
build: '.'
|
|
image: 'danieldent/postgres-replication'
|
|
restart: 'always'
|
|
environment:
|
|
POSTGRES_USER: 'postgres'
|
|
POSTGRES_PASSWORD: 'postgres'
|
|
PGDATA: '/var/lib/postgresql/data/pgdata'
|
|
volumes:
|
|
- '/var/lib/postgresql/data'
|
|
expose:
|
|
- '5432'
|
|
|
|
pg-slave:
|
|
build: '.'
|
|
image: 'danieldent/postgres-replication'
|
|
restart: 'always'
|
|
environment:
|
|
POSTGRES_USER: 'postgres'
|
|
POSTGRES_PASSWORD: 'postgres'
|
|
PGDATA: '/var/lib/postgresql/data/pgdata'
|
|
REPLICATE_FROM: 'pg-master'
|
|
volumes:
|
|
- '/var/lib/postgresql/data'
|
|
expose:
|
|
- '5432'
|
|
links:
|
|
- 'pg-master'
|