Files
hub-monorepo/packages/hub-nodejs/examples/replicate-data-postgres/docker-compose.yml
Shane da Silva cc2f5a4fae Add syncing/replication example for Postgres (#938)
Provide a working end-to-end example of syncing data from hubs to a
Postgres database.

This should work with no additional dependencies besides what you
install with `yarn install` and Docker.
2023-05-05 09:56:48 -07:00

23 lines
493 B
YAML

version: '3.9'
services:
postgres:
image: postgres:15-alpine # Smaller image for demonstration purposes
restart: unless-stopped
ports:
- '6543:5432' # Use a port unlikely to be in use
environment:
- POSTGRES_DB=hub
- POSTGRES_USER=app
- POSTGRES_PASSWORD=password
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 10s
timeout: 10s
retries: 3
volumes:
pgdata: