Created
March 7, 2018 17:37
-
-
Save ziglee/d2fec094f215d64cee29888b774c31e2 to your computer and use it in GitHub Desktop.
Sonarqube + PostgreSQL (Docker Compose)
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: "2" | |
services: | |
sonarqube: | |
image: sonarqube:6.7.1 | |
ports: | |
- "9000:9000" | |
networks: | |
- sonarnet | |
environment: | |
- SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar | |
volumes: | |
- sonarqube_conf:/opt/sonarqube/conf | |
- sonarqube_data:/opt/sonarqube/data | |
- sonarqube_extensions:/opt/sonarqube/extensions | |
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins | |
restart: always | |
db: | |
image: postgres | |
networks: | |
- sonarnet | |
environment: | |
- POSTGRES_USER=sonar | |
- POSTGRES_PASSWORD=sonar | |
volumes: | |
- postgresql:/var/lib/postgresql | |
# This needs explicit mapping due to https://github.com/docker-library/postgres/blob/4e48e3228a30763913ece952c611e5e9b95c8759/Dockerfile.template#L52 | |
- postgresql_data:/var/lib/postgresql/data | |
networks: | |
sonarnet: | |
driver: bridge | |
volumes: | |
sonarqube_conf: | |
sonarqube_data: | |
sonarqube_extensions: | |
sonarqube_bundled-plugins: | |
postgresql: | |
postgresql_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker-compose -f sonarqube-docker-compose.yml up -d