Last active
October 5, 2021 12:48
-
-
Save SBajonczak/89bcbd7778f94099c83156ecb7198521 to your computer and use it in GitHub Desktop.
Docker Compose for Sonarcube and Postgres
This file contains 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: '3.3' | |
services: | |
postgres: | |
container_name: sonar-postgres | |
environment: | |
- POSTGRES_USER=sonar | |
- POSTGRES_PASSWORD=sonar | |
ports: | |
- '5432:5432' | |
networks: | |
- mynet | |
image: postgres | |
sonarqube: | |
container_name: sonarqube | |
image: 'sonarqube:8.9.2-community' | |
networks: | |
- mynet | |
ports: | |
- '9000:9000' | |
- '9092:9092' | |
environment: | |
- SONARQUBE_JDBC_USERNAME=sonar | |
- SONARQUBE_JDBC_PASSWORD=sonar | |
- 'SONARQUBE_JDBC_URL=jdbc:postgresql://sonar-postgres:5432/sonar' | |
volumes: | |
- data:/opt/sq/data | |
- extensions:/opt/sonarqube/extensions | |
networks: | |
mynet: | |
external: false | |
volumes: | |
data: | |
extensions: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment