Skip to content

Commit

Permalink
improves postgres example
Browse files Browse the repository at this point in the history
- enables track_commit_timestamp to support Watch API
- remove mentions of now deprecated dashboard
- use postgres:15 as minimum requirement
- add zed example call
- remove http from grpc address, caused confusion to users
  • Loading branch information
vroldanbet committed Sep 4, 2024
1 parent 39e7dd1 commit 3e88b37
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions datastores/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
#
# SpiceDB settings:
# pre-shared key: foobar
# dashboard address: http://localhost:8080
# metrics address: http://localhost:9090
# grpc address: http://localhost:50051
# grpc address: localhost:50051
#
# Postgres settings:
# user: postgres
# password: secret
# port: 5432
#
# example call with zed:
# zed schema read --endpoint=localhost:50051 --insecure=true

version: "3"

Expand Down Expand Up @@ -46,9 +48,18 @@ services:
- "database"

database:
image: "postgres"
image: "postgres:15"
ports:
- "5432:5432"
environment:
- "POSTGRES_PASSWORD=secret"
- "POSTGRES_DB=spicedb"

init_database:
image: "postgres:15"
restart: "on-failure:3"
command: "psql -h database -U postgres -c \"ALTER SYSTEM SET track_commit_timestamp = on;\""
environment:
- "PGPASSWORD=secret"
depends_on:
- "database"

0 comments on commit 3e88b37

Please sign in to comment.