docker/ci/docker-compose.yml

48 lines
1.4 KiB
YAML
Raw Normal View History

2015-10-30 18:37:33 +08:00
jenkins:
build: jenkins # 根据实际情况修改
ports:
- 8051:8080
- 45000:50000
container_name: jenkins
restart: always
environment:
- TZ=Asia/Shanghai
2015-11-05 16:24:21 +08:00
- JAVA_OPTS=-Xms512m -Xmx768m -XX:MaxNewSize=256m -XX:MaxPermSize=128m
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
- M2_HOME=/var/jenkins_home/libs/maven/
2015-10-30 18:37:33 +08:00
volumes:
- /home/subversion/:/home/subversion/
- /home/jenkins_home/:/var/jenkins_home/ # 注意权限问题建议777不然造成无法启动问题。
- /home/git/:/home/git/
2015-10-30 18:37:33 +08:00
links:
- sonar_web:sonar_web
- sonar_db:sonar_db
extra_hosts:
- "timekey.8866.org:192.168.1.99"
2015-10-30 18:37:33 +08:00
sonar_web:
image: sonarqube:5.1.2
container_name: sonar-web
ports:
- "9000:9000"
links:
- sonar_db:postgres
restart: always
2015-11-05 16:20:50 +08:00
volumes:
- /home/sonar/web/data/:/opt/sonarqube/data/
- /home/sonar/web/extensions/:/opt/sonarqube/extensions/
2015-10-30 18:37:33 +08:00
environment:
- SONARQUBE_JDBC_URL=jdbc:postgresql://postgres:5432/sonar
- TZ=Asia/Shanghai
sonar_db:
image: postgres
container_name: sonar-db
restart: always
ports:
- 9432:5432
2015-11-05 16:20:50 +08:00
volumes:
- /home/sonar/db/data/:/var/lib/postgresql/data/ #注意本地目录权限只能700
2015-10-30 18:37:33 +08:00
environment:
- TZ=Asia/Shanghai
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar