fix: Role works now.
We need named volumes (not paths).
This commit is contained in:
		
							parent
							
								
									5d138edb0b
								
							
						
					
					
						commit
						58e5fd719d
					
				@ -1,24 +1,16 @@
 | 
				
			|||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## General
 | 
					## General
 | 
				
			||||||
sonarqube_image: sonarqube:latest
 | 
					sonarqube_image: sonarqube
 | 
				
			||||||
 | 
					sonarqube_db_image: postgres
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sonarqube_http_port: 3000
 | 
					sonarqube_http_port: 9000
 | 
				
			||||||
 | 
					sonarqube_api_port: 9001
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Sonarqube paths
 | 
					# Sonarqube paths
 | 
				
			||||||
sonarqube_root_path: /var/local
 | 
					sonarqube_root_path: /var/local
 | 
				
			||||||
# sonarqube_data_base:  "{{ sonarqube_root_path }}/sonarqube"
 | 
					 | 
				
			||||||
sonarqube_config_path: "{{ sonarqube_root_path }}/conf/sonarqube"
 | 
					sonarqube_config_path: "{{ sonarqube_root_path }}/conf/sonarqube"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# sonarqube_data_volume: "{{ sonarqube_data_base }}/data"
 | 
					 | 
				
			||||||
# sonarqube_conf_volume: "{{ sonarqube_data_base }}/conf"
 | 
					 | 
				
			||||||
# sonarqube_logs_volume: "{{ sonarqube_data_base }}/logs"
 | 
					 | 
				
			||||||
# sonarqube_extensions_volume: "{{ sonarqube_data_base }}/extensions"
 | 
					 | 
				
			||||||
# sonarqube_bundled_plugins_volume: "{{ sonarqube_data_base }}/bundled_plugins"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# sonarqube_db_volume: "{{ sonarqube_data_base }}/posgresql/db"
 | 
					 | 
				
			||||||
# sonarqube_db_data_volume: "{{ sonarqube_data_base }}/posgresql/data"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
sonarqube_db_user: "changeme"
 | 
					sonarqube_db_user: "changeme"
 | 
				
			||||||
sonarqube_db_password: "changeme"
 | 
					sonarqube_db_password: "changeme"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -26,13 +18,6 @@ sonarqube_db_password: "changeme"
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
sonarqube_skeleton_paths:
 | 
					sonarqube_skeleton_paths:
 | 
				
			||||||
  - "{{ sonarqube_config_path }}"
 | 
					  - "{{ sonarqube_config_path }}"
 | 
				
			||||||
  # - "{{ sonarqube_data_volume }}"
 | 
					 | 
				
			||||||
  # - "{{ sonarqube_conf_volume }}"
 | 
					 | 
				
			||||||
  # - "{{ sonarqube_logs_volume }}"
 | 
					 | 
				
			||||||
  # - "{{ sonarqube_extensions_volume }}"
 | 
					 | 
				
			||||||
  # - "{{ sonarqube_bundled_plugins_volume }}"
 | 
					 | 
				
			||||||
  # - "{{ sonarqube_db_volume }}"
 | 
					 | 
				
			||||||
  # - "{{ sonarqube_db_data_volume }}"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Add more templates to be copied into the config
 | 
					# Add more templates to be copied into the config
 | 
				
			||||||
sonarqube_configuration_files:
 | 
					sonarqube_configuration_files:
 | 
				
			||||||
 | 
				
			|||||||
@ -3,12 +3,12 @@ version: '3.9'
 | 
				
			|||||||
services:
 | 
					services:
 | 
				
			||||||
  sonarqube:
 | 
					  sonarqube:
 | 
				
			||||||
    image: "{{ sonarqube_image }}"
 | 
					    image: "{{ sonarqube_image }}"
 | 
				
			||||||
    container_name: sonarqube-service
 | 
					 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
    env_file:
 | 
					    env_file:
 | 
				
			||||||
      - "{{ sonarqube_config_path | expanduser }}/env.sonarqube.conf"
 | 
					      - "{{ sonarqube_config_path | expanduser }}/env.sonarqube.conf"
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "{{ sonarqube_http_port }}"
 | 
					      - "{{ sonarqube_http_port }}:9000"
 | 
				
			||||||
 | 
					      - "{{ sonarqube_api_port }}:9001"
 | 
				
			||||||
      # Add more ports if necessary
 | 
					      # Add more ports if necessary
 | 
				
			||||||
    networks:
 | 
					    networks:
 | 
				
			||||||
      - sonarqube-net
 | 
					      - sonarqube-net
 | 
				
			||||||
@ -22,14 +22,15 @@ services:
 | 
				
			|||||||
      - db
 | 
					      - db
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  db:
 | 
					  db:
 | 
				
			||||||
    image: postgres:12
 | 
					    image: "{{ sonarqube_db_image }}"
 | 
				
			||||||
    container_name: sonarqube-db
 | 
					 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
    env_file:
 | 
					    env_file:
 | 
				
			||||||
      - "{{ sonarqube_config_path | expanduser }}/env.db.conf"
 | 
					      - "{{ sonarqube_config_path | expanduser }}/env.db.conf"
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - sonarqube_db:/var/lib/postgresql
 | 
					      - sonarqube_db:/var/lib/postgresql
 | 
				
			||||||
      - postgresql_data:/var/lib/postgresql/data
 | 
					      - postgresql_data:/var/lib/postgresql/data
 | 
				
			||||||
 | 
					    networks:
 | 
				
			||||||
 | 
					      - sonarqube-net
 | 
				
			||||||
 | 
					
 | 
				
			||||||
volumes:
 | 
					volumes:
 | 
				
			||||||
    postgresql_data:
 | 
					    postgresql_data:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user