I am getting error java heap space error. I search on the internet and found a solution to adding

-Dsonar.ce.javaOpts=-Xmx2048m -Dsonar.web.javaOpts=-Xmx2048m

this on my docker it's solved my problem. Here is this full command

docker run -d --name sonarqube -p 9000:9000 sonarqube -Dsonar.ce.javaOpts=-Xmx2048m -Dsonar.web.javaOpts=-Xmx2048m

But when i am trying to add this on docker composer i am getting error

[FATAL tini (10)] exec Dsonar.ce.javaOpts=-Xmx2048m -Dsonar.web.javaOpts=-Xmx2048m failed: No such file or directory

version: '2'

    services:
      postgresql:
        image: 'bitnami/postgresql:latest'
        environment:
          - ALLOW_EMPTY_PASSWORD=yes
          - POSTGRESQL_USER=bn_sonarqube
          - POSTGRESQL_DATABASE=bitnami_sonarqube
          - POSTGRESQL_PASSWORD=bitnami1234
        volumes:
          - /path/to/postgresql-persistence:/bitnami
      sonarqube:
        image: bitnami/sonarqube:latest
        depends_on:
          - postgresql
        ports:
          - '80:9000'
        environment:
          - SONARQUBE_DATABASE_USER=bn_sonarqube
          - SONARQUBE_DATABASE_NAME=bitnami_sonarqube
          - SONARQUBE_DATABASE_PASSWORD=bitnami1234
          - ALLOW_EMPTY_PASSWORD=yes
        volumes:
          - /path/to/sonarqube-persistence:/bitnami
        command :
          - Dsonar.ce.javaOpts=-Xmx2048m -Dsonar.web.javaOpts=-Xmx2048m

I got error in command : - Dsonar.ce.javaOpts=-Xmx2048m -Dsonar.web.javaOpts=-Xmx2048m

Maybe I am missing something here. I am new in docker composer. Hope someone can help me to find out my solution.Thanks Advance

0 Answers