Skip to content

Instantly share code, notes, and snippets.

@pamtrak06
Created June 24, 2020 16:15
Show Gist options
  • Save pamtrak06/57d601c3d5c811a0f3a1c1965064dcef to your computer and use it in GitHub Desktop.
Save pamtrak06/57d601c3d5c811a0f3a1c1965064dcef to your computer and use it in GitHub Desktop.
version: "2"
services:
sonarqube:
image: sonarqube
ports:
- "9000:9000"
networks:
- sonarnet
environment:
- sonar.jdbc.username=sonar
- sonar.jdbc.password=
- sonar.jdbc.url=jdbc:postgresql://db:5432/sonar
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
ulimits:
nofile:
soft: 65536
hard: 65536
db:
image: postgres
networks:
- sonarnet
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=
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:
postgresql:
postgresql_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment