Skip to content

Commit

Permalink
Merge pull request #1595 from Giveth/db_read-only
Browse files Browse the repository at this point in the history
Db read only
  • Loading branch information
Rolazo authored May 29, 2024
2 parents 7554f78 + 436e052 commit 497298b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docker-compose-local-postgres-db-readonly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
services:
impact-graph-postgres:
# Use this postgres image https://github.com/Giveth/postgres-givethio
image: ghcr.io/giveth/postgres-givethio:latest
restart: always
environment:
- POSTGRES_DB=givethio
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data

impact-graph-postgres-replica:
# Read-only replica of the main Postgres container
image: ghcr.io/giveth/postgres-givethio:latest
restart: always
environment:
- POSTGRES_DB=givethio
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_PRIMARY_HOST=impact-graph-postgres
- POSTGRES_PRIMARY_PORT=5432
- POSTGRES_PRIMARY_USER=postgres
- POSTGRES_PRIMARY_PASSWORD=postgres
- POSTGRES_REPLICA=true
ports:
- "5431:5432"
volumes:
- db-data-replica:/var/lib/postgresql/data
networks:
- giveth


volumes:
db-data:
db-data-replica:


networks:
giveth:

0 comments on commit 497298b

Please sign in to comment.