I am using the postgres:11.6-alpine image for one of my applications and I would like to set the image wal_level to 'logical' on setup, preferably using docker-compose.
The solutions I found needs you to overwrite the image postgresql.conf. However I dont want to have a full postgresql.conf file just to change this setting.
Is there any way I can do this?
Update the command
portion of your PostgreSQL container configuration like so.
services:
postgres:
image: postgres:11.6-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_DB=my_db
- POSTGRES_PASSWORD=changeme
command:
- "postgres"
- "-c"
- "wal_level=logical"
Or
command: [ "postgres", "-c", "wal_level=logical" ]
If you prefer that formatting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With