Didn't see any update in Sonar.properties

we are using SonarQube Enterprise Edition.
We just started using the docker-compose.yaml file to create the SQ container. It is making SQ up successfully.
But I didn’t see any change in sonar.properties

Can you please guide me where those changes are happening?

version: "3"
services:
  sonarqube:
    image: sonarqube:lts-enterprise
    container_name: sonarqube
    hostname: sonarqube
    depends_on:
      - db
    environment:
      SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
      SONAR_JDBC_USERNAME: sonar
      SONAR_JDBC_PASSWORD: sonar
      SONAR_WEB_HOST: 0.0.0.0
      SONAR_WEB_JAVAOPTS: -server -Xms1G -Xmx1G -XX:+HeapDumpOnOutOfMemoryError
      SONAR_WEB_PORT: 9000
      SONAR_CE_JAVAOPTS: -server -Xms1G -Xmx1G -XX:+HeapDumpOnOutOfMemoryError
      SONAR_SEARCH_JAVAOPTS: -server -Xms1G -Xmx1G -XX:+HeapDumpOnOutOfMemoryError
    volumes:
      - sonarqube_data:/opt/sonarqube/data
      - sonarqube_extensions:/opt/sonarqube/extensions
      - sonarqube_logs:/opt/sonarqube/logs
      - sonarqube_temp:/opt/sonarqube/temp
      - sonarqube_conf:/opt/sonarqube/conf
      - sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
    ports:
      - "9000:9000"
  db:
    image: postgres:12
    environment:
      POSTGRES_USER: sonar
      POSTGRES_PASSWORD: sonar
    volumes:
      - postgresql:/var/lib/postgresql
      - postgresql_data:/var/lib/postgresql/data
    restart: on-failure
    container_name: postgresql

volumes:
  sonarqube_data:
  sonarqube_extensions:
  sonarqube_logs:
  sonarqube_temp:
  sonarqube_conf:
  sonarqube_bundled-plugins:
  postgresql:
  postgresql_data:

Hi,

You’re expecting the sonar.properties file to be updated/overwritten? Why?

 
Ann

Hi Ann,

I am doing some environment variable changes through the docker-compose file. So that’s why I am expecting it will overwrite sonar.properties files.
I might not be right because, before that, we are not using the docker-compose file. Manually installing sonarqube enterprise version and updating sonar.properties. That’s why I am expecting the same when I am using the docker-compose file.
Would you please correct me if I am wrong? Thanks a lot for your help on this! And where should I see those changes I am applying in the docker-compose file if sonar.properties is not the right file to see that changes.

Thanks,
Roop Kaur

Hi Roop,

You should not expect to see automated updates to sonar.properties. As to where you should expect to see your env vars take effect, well… in the operation of SonarQube.

 
HTH,
Ann