trying to handle the postgresql.conf from the host fails #467
-
Hi guys, I'm trying to add some configuration options in postgres:
image: kartoza/postgis:16-3.4
hostname: postgres
ports:
- 5432:5432
networks:
- postgres-net
environment:
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASS=${PGPASSWORD}
volumes:
- postgres-vol:/var/lib/postgresql/data
- ./pg/conf/postgresql.conf:/etc/postgresql/16/main/postgresql.conf <------------- BREAK THE SERVICE when I start the service, I get this error in the container: 2024-03-05 19:38:27 Creating /settings directory
2024-03-05 19:38:27 Creating /docker-entrypoint.initdb.d directory
2024-03-05 19:38:27 sed: cannot rename /etc/postgresql/16/main/sedlDyNIm: Device or resource busy |
Beta Was this translation helpful? Give feedback.
Answered by
BigBoulard
Mar 5, 2024
Replies: 1 comment
-
I just saw a previous question just after posting. Hence, I understand that extra configuration (or I assume overrides ) should be written in an postgres:
image: kartoza/postgis:16-3.4
hostname: postgres
ports:
- 5432:5432
networks:
- postgres-net
environment:
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASS=${PGPASSWORD}
volumes:
- postgres-vol:/var/lib/postgresql/data
- ./pg/conf/extra.conf:/settings/extra.conf
volumes:
postgres-vol: Best |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BigBoulard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just saw a previous question just after posting. Hence, I understand that extra configuration (or I assume overrides ) should be written in an
extra.conf
file bind mounted like below:Best