首先搞三台虚拟机
互相ping一下,ping一下114.114.114.114看是否能通,如果不能通的话断开网重试一下
安装redis,postgres
version: '3' services: dev_redis: restart: always image: redis ports: - "16379:6379" volumes: - /docker/redis/data:/data - /etc/localtime:/etc/localtime:ro environment: - TZ="Asia/Shanghai"
version: '3.1' services: postgresdb: image: postgres restart: always ports: - 15432:5432 environment: - POSTGRES_USER:postgres - POSTGRES_PASSWORD:postgres - POSTGRES_DB:postgresdb - TZ="Asia/Shanghai" volumes: - /docker/postgres/data:/var/lib/postgresql/data - /etc/localtime:/etc/localtime:ro deploy: placement: constraints: [node.role == manager]
新建两个库
一个redis,一个postgres
镜像都是先pull然后再运行yml文件
相互连接,按文档做
Jenkins创建任务
谁有权限能够拿到项目
监控
下载