Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker Compose for Sonarcube and Postgres
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