I am not very sure where to ask this question as it is related to self hosting SonarQube and the Docker Doc:
It links to docker-sonarqube/example-compose-files/sq-with-postgres at master · SonarSource/docker-sonarqube · GitHub, which maps PostGres like so:
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
- Mounting both postgresql and postgresql_data on overlapping paths is not standard.
- The only valid persistent path for official Postgres images is AFAIK
/var/lib/postgresql/data
It would, further, be much better to host map the data, so in case of a unexpected Docker failure we have the DB saved.
Doc also says we have to docker volume create
the volumes… which again AFAIK is not something required. I run dockers all the time and the volumes inside docker are always taken care of by docker. Usually, it even creates host side volumes, however there I can agree they should be first created so they are not owned by root.
What do I miss?