Skip to content

Instantly share code, notes, and snippets.

@aflp91
Forked from giansalex/README.md
Created February 27, 2020 07:32
Show Gist options
  • Save aflp91/7ad95b32a8fdf28352ab6eb2169808c9 to your computer and use it in GitHub Desktop.
Save aflp91/7ad95b32a8fdf28352ab6eb2169808c9 to your computer and use it in GitHub Desktop.
Sonarqube Docker Compose

SonarQube Docker

  • Create a directory for project
  • Copy docker-compose.yml
  • Create /extensions in project directory.
  • Run docker-compose up -d
version: '3.1'
services:
db:
image: postgres:alpine
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
- POSTGRES_DB=sonar
networks:
- sonarnet
volumes:
- postgresql_data:/var/lib/postgresql/data
sonarqube:
image: sonarqube:alpine
depends_on:
- db
environment:
- SONARQUBE_JDBC_USERNAME=sonar
- SONARQUBE_JDBC_PASSWORD=sonar
- SONARQUBE_JDBC_URL=jdbc:postgresql://db/sonar
networks:
- sonarnet
ports:
- "9000:9000"
volumes:
- ./extensions:/opt/sonarqube/extensions
networks:
sonarnet:
volumes:
postgresql_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment