Skip to content

Instantly share code, notes, and snippets.

@giansalex
Last active April 25, 2020 21:23
Show Gist options
  • Save giansalex/7c35a4af37bab57690a9f2fa8baea4fd to your computer and use it in GitHub Desktop.
Save giansalex/7c35a4af37bab57690a9f2fa8baea4fd to your computer and use it in GitHub Desktop.
Sonarqube Docker Compose - Alpine

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:8.2-community
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