3liz / lizmap-docker-compose

Run Lizmap stack with docker-compose
30 stars 42 forks source link

pg_service.conf not copied #55

Closed ca-rock closed 11 months ago

ca-rock commented 12 months ago

Hi, It seems that the pg_service.conf file is not copied into the map container.

I added my configurations into ~/lizmap-docker-compose/lizmap/etc/pg_service.conf But I find in the logs of the map container (docker logs lizmap-docker-compose-map-1 --since 5m) that : service file "/srv/etc/pg_service.conf" not found

When I write the content from the container directly into the file /srv/etc/pg_service.conf, it works.

dmarteau commented 12 months ago
ca-rock commented 11 months ago

The pg_service file is copied into the lizmap container in /srv/etc. It's totally consistent with the docker-compose.yml rules. But it seems that it's the map container that looks for this file. I have the file-not-found error from it. When I write the pg_service file into the map container on /srv/etc, it works. Shouldn't the pg_service.conf file be copied into the map container at /srv/etc instead of the lizmap container ?

dmarteau commented 11 months ago

The pg_service file is copied into the lizmap container in /srv/etc

No, the pg_service file is mounted in various container since it it used by several services. A pg_service file is related to the local configuration and there is no reason to copy it in the container: rules for local configuration is to 'mount' them from local directory/files.

ca-rock commented 11 months ago

I understand. In better words : It seems that the map container needs /src/etc/pg_service.conf and doesn't find it, shouldn't the /srv/etc be mounted into the map container too ? For now : volumes:

dmarteau commented 11 months ago

the etc folder is not mounted.

Yes, it appears to be missing, thanks for pointing it....

dmarteau commented 11 months ago

Fixed in bad4b2558613b868e081e2cc171530476922750d