On an Ubuntu 18.04LTS host with docker-compose v1.23.1:
I’m trying to upgrade from 9.3.0 Developer to 9.9 Developer. I’m currently running with Postgres v10, so I need to upgrade to at least v11.
So on a staging server I modified the docker-compose file to reflect the two new image versions (SQ 9.9-Dev and PG11.7), but only started the database service. I created an empty “sonar” db, and restored on it the backup from the running instance. I then started SQ as well. It ignored my database, and started H2 instead.
As a PoC I started a community edition SQ, this time it saw my restored database, and with /setup in the URL I successfully migrated/upgrade it. And yet, after all that, the GUI comes up with zero projects or users, everything has been wiped out.
I’ve spent 2 days already on this, it’s getting frustrating.
Please suggest a working upgrade path for me (I can’t find one in the upgrade guide), or a working docker-compose.yml file, whichever is easier for you.
Here is my initial (and working) docker-compose.yml file from the runnign 9.3.0 server.
version: "3" services: sonarqube: container_name: sonar image: sonarqube:9.3.0-developer depends_on: - db restart: always ports: - "80:9000" - "9092:9092" networks: - sonarnet environment: - SONARQUBE_JDBC_USERNAME=sqube - SONARQUBE_JDBC_PASSWORD=something - SONARQUBE_JDBC_URL=jdbc:postgresql://sonar_db:5432/sonar - SONARQUBE_URL=https://sonarqube.mycompany.com security_opt: - "seccomp=/sonar/data/docker/seccomp-profile.json" volumes: - /sonar/data/sonarqube/sonarqube_data:/opt/sonarqube/data - /sonar/data/sonarqube/sonarqube_extensions:/opt/sonarqube/extensions - /sonar/data/sonarqube/sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins db: container_name: sonar_db image: postgres:10.10 restart: always ports: - "5432:5432" networks: - sonarnet environment: - POSTGRES_USER=sqube - POSTGRES_PASSWORD=something - POSTGRES_DB=sonar volumes: - /sonar/data/sonarqube/postgresql:/var/lib/postgresql - /sonar/data/sonarqube/postgresql_data:/var/lib/postgresql/data - /sonar/backup:/tmp/backup networks: sonarnet: driver: bridge ipam: driver: default config: - subnet: 10.40.1.1/24