1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/docker-compose.db-dev.yml
Laurent Cozic 087a4b28b1 pg setup
2024-05-10 13:48:54 +01:00

54 lines
1.6 KiB
YAML

# For development this compose file starts the database only. The app can then
# be started using `yarn start-dev`, which is useful for development, because
# it means the app Docker file doesn't have to be rebuilt on each change.
version: '3'
services:
postgres_master:
image: postgres:16
command: postgres -c work_mem=100000
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=joplin
- POSTGRES_USER=joplin
- POSTGRES_DB=joplin
# - POSTGRESQL_PGAUDIT_LOG=READ,WRITE
- POSTGRESQL_LOG_HOSTNAME=true
- POSTGRESQL_REPLICATION_MODE=master
- POSTGRESQL_REPLICATION_USER=repl_user
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
postgres_slave:
image: postgres:16
command: postgres -c work_mem=100000
ports:
- "5433:5432"
depends_on:
- postgres_master
environment:
- POSTGRES_PASSWORD=joplin
- POSTGRES_USER=joplin
- POSTGRES_DB=joplin
# - POSTGRESQL_PGAUDIT_LOG=READ,WRITE
- POSTGRESQL_MASTER_HOST=postgresql-master
- POSTGRESQL_LOG_HOSTNAME=true
- POSTGRESQL_REPLICATION_MODE=slave
- POSTGRESQL_REPLICATION_USER=repl_user
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
- POSTGRESQL_MASTER_PORT_NUMBER=5432
# Use this to specify additional Postgres
# config parameters:
#
# command:
# - "postgres"
# - "-c"
# - "log_min_duration_statement=0"