I’m running Lemmy through Docker. Because I have problems with the performance of my Lemmy instance I wanted to tune my PostgreSQL container to better utilise my RAM. Foolishly I skipped that step when I initially set everything up.

Docker-compose seems to have created the directory customPostgresql.conf when I first fired it up. Now, when I try to remove this directory and instead add it as a file with my settings I get the error.

ERROR: for postgres Cannot start service postgres: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: rootfs_linux.go:76: mounting “/var/kunden/webs/default/lemmy/customPostgresql.conf” to rootfs at “/etc/postgresql.conf” caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

So I guess it doesn’t like that because it has already created /etc/postgresql.conf as a directory inside the container. Is there a way to reverse that?

As a workaround I’ve added my settings to volumes/postgres/postgresql.conf. But I’d prefer to have everything set up like it’s shown in the documentation.