docker CI部署样例
生活随笔
收集整理的這篇文章主要介紹了
docker CI部署样例
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
docker CI部署樣例
想學習更全面的docker知識可以點擊右側: Docker的概念及基本指令學習(全)
記得先創建掛載出去的文件夾,網上教學據說不創建也能用,但是可能是我自己環境原因不太行,所以就提前創建好了。整套流程用的是LDAP(管理賬號用的)+ heimdall(門戶站點)+gitlab (代碼倉庫)+ jenkins (持續構建、流水線)+redmine(飯票)+ sonar (代碼質量檢測工具)+nextcloud(網盤) 部分功能持續更新中......
version: '3.1'services:hs-ldap:image: osixia/openldap:latesthostname: hs-ldaprestart: alwaysports:- "10001:389"volumes:- /home/docker_vol/openldap/slapd/database:/var/lib/ldap- /home/docker_vol/openldap/slapd/config:/etc/ldap/slapd.d- /etc/localtime:/etc/localtime:roenvironment:- LDAP_ORGANISATION=jn- LDAP_DOMAIN=jn.com- LDAP_ADMIN_PASSWORD=P@ssword- LDAP_CONFIG_PASSWORD=P@ssword- TZ=Asia/Shanghairedmine:image: redminerestart: alwaysports:- "10003:3000"volumes:- /home/docker_vol/redmine/files:/usr/src/redmine/files- /home/docker_vol/redmine/log:/usr/src/redmine/log- /home/docker_vol/redmine/data:/home/redmine/data- /home/docker_vol/redmine/config/configuration.yml:/usr/src/redmine/config/configuration.yml- /home/docker_vol/redmine/plugins:/usr/src/redmine/plugins- /etc/localtime:/etc/localtime:roenvironment:REDMINE_DB_MYSQL: dbREDMINE_DB_PASSWORD: schoolcloudREDMINE_SECRET_KEY_BASE: supersecretkeyREDMINE_DB_ENCODING: utf8db:image: mysql:5.7restart: alwaysports:- "10010:3306"command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_civolumes:- /home/docker_vol/redmine/mysql/data:/var/lib/mysql- /home/docker_vol/redmine/mysql/conf:/etc/mysql/conf.d- /etc/localtime:/etc/localtime:roenvironment:MYSQL_ROOT_PASSWORD: schoolcloudMYSQL_DATABASE: redmineTZ: Asia/Shanghaidb_nextcloud:image: mysql:5.7restart: alwaysports:- "10011:3306"command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_civolumes:- /home/docker_vol/nextcloud/mysql/data:/var/lib/mysql- /home/docker_vol/nextcloud/mysql/conf:/etc/mysql/conf.d- /etc/localtime:/etc/localtime:roenvironment:MYSQL_ROOT_PASSWORD: schoolcloudMYSQL_PASSWORD: schoolcloudMYSQL_DATABASE: nextcloudMYSQL_USER: nextcloudTZ: Asia/Shanghaidevops-nextcloud:image: nextcloudrestart: alwaysports:- "10002:80"volumes:- /home/docker_vol/nextcloud/html1:/var/www/html- /etc/localtime:/etc/localtime:roenvironment:REDMINE_DB_MYSQL: db_nextcloudREDMINE_DB_PASSWORD: schoolcloudREDMINE_SECRET_KEY_BASE: supersecretkeyREDMINE_DB_ENCODING: utf8heimdall:image: linuxserver/heimdallrestart: alwayscontainer_name: heimdallenvironment:- PUID=1000- PGID=1000- TZ=Asia/Shanghaivolumes:- /home/docker_vol/heimdall/config:/configports:- 80:80- 443:443restart: unless-stoppedgitlab:privileged: trueimage: gitlab/gitlab-cerestart: alwaysports:- "5443:443"- "82:82"- "2222:22"volumes:- /home/docker_vol/gitlab/config:/etc/gitlab- /home/docker_vol/gitlab/data:/var/opt/gitlab- /home/docker_vol/gitlab/logs:/var/log/gitlabtty: truejenkins:privileged: truetty: trueimage: jenkins/jenkins:2.289.1-lts-centos7restart: alwaysports:- "9302:8080"- "50000:50000"volumes:- /home/docker_vol/jenkins:/var/jenkins_home- /var/run/docker.sock:/var/run/docker.socksonarqube:restart: alwaysimage: sonarqubetty: trueenvironment:- SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=trueports:- "9000:9000"制作整理不易,以上內容均為原創(參考了部分官方文檔和老師整理的案例)。如要引用請附上本文鏈接,如有疑問可以在評論區暢所欲言,作者看到會第一時間回復,歡迎交流!
總結
以上是生活随笔為你收集整理的docker CI部署样例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: winhex
- 下一篇: comsol仿真模型:风力发电机复合材料