Wrong volume mount in example docker-compose
SebastianCmentowski opened this issue · 3 comments
Hi,
I just noticed that the mounting of the postgresql volume in the example docker-compose file is not correct.
It should be mounted to "/var/lib/postgresql/data", otherwise the postgresql-Dockerfile creates an anonymous volume
and the database data is not persistent if the container is removed (which happened to me ;) ).
Hi, the docker-compose files in the repository are not really meant for production but just examples to get started.
https://github.com/martialblog/docker-limesurvey/blob/master/docker-compose.pgsql.yml#L9
Cheers,
Markus
@martialblog It's true that they are only meant as examples, but this example is at least pretty misleading... in fact, I remember that we ran into the exact same issue several years ago at Vision without Gitlab Postgres deployment. We mounted the volume on a "higher" directory and Docker decided to create an anonymous volume within it. After the restart, poof, data was gone.
@SebastianCmentowski Thanks for pointing this out, I've opened a PR: #113
@jacksgt Yeah, thanks for pointing this out.
Of course, the provided examples are not really meant for production. But on the other hand, they serve as a good entry point . For example, I am a full-time phd student and have to manage my gitlab+limesurvey server on my own somewhere in between the rest of my work. Despite my CS background, I am of course no Docker expert and basically self-taught myself the necessary skills using a lot of such example setups. (Otherwise, my time wouldn't suffice for a full Docker course :D) In such cases, the provided examples are utterly valuable. Since it was pure luck that I discovered the wrong mounting before actually feeding data into limesurvey, I thought it may be an easy and good thing to fix this small issue.