1 下载docker-compose文件
mkdir -p /usr/local/jianmu
cd /usr/local/jianmu
wget https://gitee.com/jianmu-dev/jianmu-deploy/raw/master/docker-compose.yml
2 修改端口号
vi docker-compose.yml
根据实际情况修改,比如这里jianmu-mysql 暴露端口修改为10005,建木的http和https服务端口分别修改为10006和10007
version: '3'
services:
jianmu-mysql:
image: mysql:8
command: --init-connect='SET NAMES utf8' --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1200 --max-user-connections=1000
ports:
- "10005:3306"
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: "jianmu"
TZ: "Asia/Shanghai"
ci-server:
image: jianmudev/jianmu-ci-server:v2.3.1
restart: always
environment:
SPRING_PROFILES_ACTIVE: dev
SPRING_DATASOURCE_URL: jdbc:mysql://jianmu-mysql:3306/jianmu?useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: 123456
EMBEDDED_DOCKER-WORKER_DOCKER-HOST: unix:///var/run/docker.sock
EMBEDDED_DOCKER-WORKER_SOCK-FILE: /var/run/docker.sock
JIANMU_API_ADMINPASSWD: 123456
# REGISTRY_AK:
# REGISTRY_SK:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /mnt/jianmu/ci:/ci
depends_on:
- jianmu-mysql
entrypoint: ["/wait-for-it.sh", "jianmu-mysql:3306", "-t", "0", "--", "java", "-Duser.timezone=Asia/Shanghai", "-cp", "/app/resources:/app/classes:/app/libs/*", "dev.jianmu.api.SpringbootApp"]
web:
image: jianmudev/jianmu-ci-ui:v2.3.1
ports:
- "10006:80"
- "10007:443"
restart: always
depends_on:
- jianmu-mysql
- ci-server
networks:
default:
ipam:
config:
- subnet: 10.1.0.0/16
3 启动服务
docker-compose up -d
4 启动后默认的用户名和密码
在浏览器输入 http://{服务器ip}:10006, 即可访问登录页面
默认的用户名密码为
用户名:admin
密码:123456
至此已经部署完毕