version: "3.9"

services:

  sonarqube:
    container_name: sonarqube
    image: sonarqube:9-community
    ports:
      - 9000:9000
    environment:
      SONARQUBE_JDBC_USERNAME: tbs093a
      SONARQUBE_JDBC_PASSWORD: aCD32Sfqw
      SONARQUBE_JDBC_URL: jdbc:postgresql://postgresql:5432/sonar  
    volumes:
      - ./volumes/sonarqube/data:/opt/sonarqube/data
      - ./volumes/sonarqube/logs:/opt/sonarqube/logs
      - ./volumes/sonarqube/extensions:/opt/sonarqube/extensions

  postgresql:
    container_name: postgresql
    image: postgres:15.2-alpine
    environment:
      POSTGRES_USER: tbs093a
      POSTGRES_PASSWORD: aCD32Sfqw
    ports:
      - 5432
    volumes:
      - ./volumes/postgresql:/var/lib/postgresql
    
