Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lando recipe for SonarQube #264

Open
tormi opened this issue Feb 22, 2024 · 0 comments
Open

Lando recipe for SonarQube #264

tormi opened this issue Feb 22, 2024 · 0 comments

Comments

@tormi
Copy link

tormi commented Feb 22, 2024

Here's the Lando recipe for SonarQube:

.lando.yml

name: sonar

proxy:
  sonar:
    - sonar.lndo.site:9000

services:
  db:
    type: postgres:15
    portforward: true
    overrides:
      environment:
        POSTGRES_USER: postgres
        POSTGRES_PASSWORD: ''
        POSTGRES_DB: database
  # @see: https://github.com/SonarSource/docker-sonarqube/tree/master/10/community
  # @see: https://github.com/SonarSource/docker-sonarqube/blob/master/example-compose-files/sq-with-postgres/docker-compose.yml
  sonar:
    type: lando
    ssl: true
    sslExpose: false
    depends_on:
      - db
    services:
      image: sonarqube:10.4-community
      command: "/opt/sonarqube/docker/entrypoint.sh"
      volumes:
        - sonarqube_data:/opt/sonarqube/data
        - sonarqube_extensions:/opt/sonarqube/extensions
        - sonarqube_logs:/opt/sonarqube/logs
      ports:
        - "9000:9000"
    overrides:
      environment:
        # Lando webroot via environment variable.
        LANDO_WEBROOT: /opt/sonarqube/web
        SONAR_JDBC_URL: jdbc:postgresql://db:5432/database
        SONAR_JDBC_USERNAME: postgres
        SONAR_JDBC_PASSWORD: ''

volumes:
  sonarqube_data:
    driver: local
  sonarqube_extensions:
    driver: local
  sonarqube_logs:
    driver: local

# Tested with Lando version.
version: v3.21

.gitignore

# SonarQube volume directories.
sonarqube_data
sonarqube_extensions
sonarqube_logs

README.md

## Environments

### Local environment

1. Install the latest [Lando](https://docs.lando.dev/install).
2. Start the site by running `lando start`.
3. Access the site at <https://sonar.lndo.site>. Initial login credentials are `admin`/`admin`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant