Created
September 4, 2019 12:37
-
-
Save haghighi/e60acc07fb798339cf709236d5be9326 to your computer and use it in GitHub Desktop.
sonarqube-docker-compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "2" | |
| services: | |
| sonarqube: | |
| image: sonarqube | |
| restart: always | |
| ports: | |
| - "9000:9000" | |
| networks: | |
| - sonarnet | |
| environment: | |
| - sonar.jdbc.url=jdbc:postgresql://db:5432/sonar | |
| volumes: | |
| - sonarqube_sonarqube_conf:/opt/sonarqube/conf | |
| - sonarqube_sonarqube_data:/opt/sonarqube/data | |
| - sonarqube_sonarqube_extensions:/opt/sonarqube/extensions | |
| db: | |
| image: postgres | |
| restart: always | |
| networks: | |
| - sonarnet | |
| environment: | |
| - POSTGRES_USER=sonar | |
| - POSTGRES_PASSWORD=sonar | |
| volumes: | |
| - sonarqube_postgresql:/var/lib/postgresql | |
| # This needs explicit mapping due to https://github.com/docker-library/postgres/blob/4e48e3228a30763913ece952c611e5e9b95c8759/Dockerfile.template#L52 | |
| - sonarqube_postgresql_data:/var/lib/postgresql/data | |
| networks: | |
| sonarnet: | |
| driver: bridge | |
| volumes: | |
| sonarqube_sonarqube_conf: | |
| external: true | |
| sonarqube_sonarqube_data: | |
| external: true | |
| sonarqube_sonarqube_extensions: | |
| external: true | |
| sonarqube_postgresql: | |
| external: true | |
| sonarqube_postgresql_data: | |
| external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment