2021-01-18 10:13:26 +00:00
|
|
|
# For development this compose file starts the database only. The app can then
|
2024-01-26 20:19:28 +00:00
|
|
|
# be started using `yarn start-dev`, which is useful for development, because
|
2021-01-18 10:13:26 +00:00
|
|
|
# it means the app Docker file doesn't have to be rebuilt on each change.
|
|
|
|
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
2024-05-10 12:48:54 +00:00
|
|
|
|
|
|
|
postgres_master:
|
2023-11-12 16:16:04 +00:00
|
|
|
image: postgres:16
|
2021-10-10 17:02:42 +00:00
|
|
|
command: postgres -c work_mem=100000
|
2021-01-18 10:13:26 +00:00
|
|
|
ports:
|
|
|
|
- "5432:5432"
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=joplin
|
|
|
|
- POSTGRES_USER=joplin
|
|
|
|
- POSTGRES_DB=joplin
|
2024-05-10 12:48:54 +00:00
|
|
|
|
|
|
|
# - 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
|
|
|
|
|
|
|
|
|
2021-12-01 13:52:38 +00:00
|
|
|
|
2021-06-17 15:51:25 +00:00
|
|
|
# Use this to specify additional Postgres
|
|
|
|
# config parameters:
|
|
|
|
#
|
|
|
|
# command:
|
|
|
|
# - "postgres"
|
|
|
|
# - "-c"
|
|
|
|
# - "log_min_duration_statement=0"
|