Created
July 15, 2021 14:56
-
-
Save webchi/1ec9aa113f4972928d564ee8a0b06c31 to your computer and use it in GitHub Desktop.
Sonarqube server with caddy proxy and letsencrypt
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: "3" | |
services: | |
caddy: | |
image: caddy:2.4.3-alpine | |
restart: unless-stopped | |
command: caddy reverse-proxy --from https:/you-awesome-domain.com:443 --to http://sonarqube:9000 | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- caddy_data:/data | |
depends_on: | |
- sonarqube | |
sonarqube: | |
image: sonarqube:community | |
depends_on: | |
- db | |
environment: | |
SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar | |
SONAR_JDBC_USERNAME: sonar | |
SONAR_JDBC_PASSWORD: sonar | |
volumes: | |
- sonarqube_data:/opt/sonarqube/data | |
- sonarqube_extensions:/opt/sonarqube/extensions | |
- sonarqube_logs:/opt/sonarqube/logs | |
db: | |
image: postgres:12 | |
environment: | |
POSTGRES_USER: sonar | |
POSTGRES_PASSWORD: sonar | |
volumes: | |
- postgresql:/var/lib/postgresql | |
- postgresql_data:/var/lib/postgresql/data | |
volumes: | |
sonarqube_data: | |
sonarqube_extensions: | |
sonarqube_logs: | |
postgresql: | |
postgresql_data: | |
caddy_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on official documentation https://docs.sonarqube.org/latest/setup/install-server/#header-4