ansible-role-sonarqube/templates/docker-compose.yml.j2
2023-04-28 00:32:36 +02:00

43 lines
1.0 KiB
Django/Jinja

# sonarqube docker compose
version: '3.9'
services:
sonarqube:
image: "{{ sonarqube_image }}"
container_name: sonarqube-service
restart: always
env_file:
- "{{ sonarqube_config_path | expanduser }}/env.sonarqube.conf"
ports:
- "{{ sonarqube_http_port }}"
# Add more ports if necessary
networks:
- sonarqube-net
# optional
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
depends_on:
- db
db:
image: postgres:12
container_name: sonarqube-db
restart: always
env_file:
- "{{ sonarqube_config_path | expanduser }}/env.db.conf"
volumes:
- sonarqube_db:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
volumes:
postgresql_data:
sonarqube_bundled-plugins:
sonarqube_conf:
sonarqube_data:
sonarqube_db:
sonarqube_extensions:
networks:
sonarqube-net: {}