Advertisement
huezohuezo1990

sonarqube Docker

Nov 1st, 2023
921
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.10 KB | None | 1 0
  1. version: "3"
  2. services:
  3.   sonarqube:
  4.     image: sonarqube:community
  5.     hostname: sonarqube
  6.     restart: always
  7.     container_name: sonarqube
  8.     depends_on:
  9.      - db
  10.     environment:
  11.       SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
  12.       SONAR_JDBC_USERNAME: sonar
  13.       SONAR_JDBC_PASSWORD: sonar
  14.     volumes:
  15.      - sonarqube_data:/opt/sonarqube/data
  16.       - sonarqube_extensions:/opt/sonarqube/extensions
  17.       - sonarqube_logs:/opt/sonarqube/logs
  18.     ports:
  19.      - "8182:9000"
  20.     deploy:
  21.       resources:
  22.         limits:
  23.           cpus: "1"
  24.           memory: 2048M
  25.   db:
  26.     image: postgres:13
  27.     hostname: postgresql
  28.     restart: always
  29.     container_name: postgresql
  30.     environment:
  31.       POSTGRES_USER: sonar
  32.       POSTGRES_PASSWORD: sonar
  33.       POSTGRES_DB: sonar
  34.     deploy:
  35.       resources:
  36.         limits:
  37.           cpus: "1"
  38.           memory: 2048M
  39.     volumes:
  40.      - postgresql:/var/lib/postgresql
  41.       - postgresql_data:/var/lib/postgresql/data
  42.  
  43. volumes:
  44.   sonarqube_data:
  45.   sonarqube_extensions:
  46.   sonarqube_logs:
  47.   postgresql:
  48.   postgresql_data:
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement