2019-08-07 docker-compose-sonar-
2019-08-07 本文已影响0人
五大RobertWu伍洋
version: '3'
services:
sonar:
image: "sonarqube:7.6-community"
ports:
- 9000:9000
- 9092:9092
restart: always
links:
- mysql
container_name: "sonar"
#command: "bin/run.sh"
#volumes:
# - ./sonar_base/:/opt/sonarqube/
environment:
- "SONARQUBE_JDBC_USERNAME=root"
- "SONARQUBE_JDBC_PASSWORD=123456"
#- "SONARQUBE_JDBC_URL=jdbc:mysql:///sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false"
- "SONARQUBE_JDBC_URL=jdbc:mysql://mysql:3306/test?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false"
mysql:
image: mysql:5.7
ports:
- 3306:3306
restart: always
container_name: "sonar_mysql"
volumes:
- ./sonar_mysql/:/var/lib/mysql/
environment:
- "MYSQL_ROOT_PASSWORD=123456"