Sonarqube setup with docker

Hi Team,

Actually I am trying to setup Sonarqube using docker image , so basically my whole setup will be setting Sonarqube on AWS ECS cluster with Fargate option , I have a concern , IN order to maintain the Data in docker volumes we can do it via volume mapping on ec2 instance ,

But how do we do it via fargate option , DO we need to connect it to external DB like RDS , if so What is the procedure ??

It will be helpful if you share any details regarding this as we are thinking of setting up in this way and we may even go with Developer edition regarding this.

Please let me know if you need any additional details.

Hi Team,

Any update on the above setup ?? Any help regarding this will be highly appreciated.

Vinodkumar Mandalapu

Hi @vinodkumar4b9 ,

sorry for the delay, a lot were in vacation in between the years and around Christmas.

SonarQube is in most cases stateless as in all data is persisted in the database, so in order to have a reliable source of truth you should always connect your sonarqube instance to a external DB. The internal sqlite database is for evaluation purpose only and gone if your container is deleted.
Assuming that you will only use environment variables for configuration and an external database, the only downside of loosing your volumes would be a reindex of elasticsearch during startup that would delay the availability of sonarqube and the loss of logs/historic metrics.

As per our docs you can set the following environment variables during deployment in order to configure a postgresql database on RDS:


Hope that helps

Hi Tobias,

Thanks for sharing the details, Not a problem as I know people might be on vacation , so you are saying I can use Sonarqube with RDS as per the above setup and if my fargate task is deleted and new task has been created , I can still be able to get all the metrics and details which was there earlier before deletion ryt ? that is the reason why we are trying to use fargate .

can you please let me know Is using Sonarqube with fargate is better option for Developer Edition or do you want to prefer anything else .

We might start setting up soon and we will be using developer edition and clients will get in touch with the team

Any details on this will be highly appreciated for deciding which configurations to use

Well you are still at risk of a task being deleted before it can persist to the database. this setup is possible but not advised for the above mentioned reasons (ES reindex after startup and risk of race conditions), so i would advise you to use EFS volumes and a dedicated database.

As for the version to choose: there is no dedicated better version to be used with fargate tbh. if you need a feature that is only available in the Developer Edition or the Enterprise Edition, shoot for one of these but none are optimized to be used with fargate

Hi Tobias,

Thank you so much for the additional details , We will take this further and will reach out to the team for additional details.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.