Skip to content

Instantly share code, notes, and snippets.

@webchi
Created July 15, 2021 14:56
Show Gist options
  • Save webchi/1ec9aa113f4972928d564ee8a0b06c31 to your computer and use it in GitHub Desktop.
Save webchi/1ec9aa113f4972928d564ee8a0b06c31 to your computer and use it in GitHub Desktop.
Sonarqube server with caddy proxy and letsencrypt
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:
@webchi
Copy link
Author

webchi commented Jul 15, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment