mirror of
https://github.com/farcasterxyz/hub-monorepo.git
synced 2026-02-11 21:45:09 -05:00
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.
23 lines
493 B
YAML
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:
|