docker部署mule服务、ftp服务

前言

docker方式部署mule、ftp服务,ftp用于上传文件至mule的服务器上

部署mule

]# mkdir -p /data/deploy/mule
]# cd /data/deploy/mule
]# echo 'Asia/Shanghai' > /etc/timezone
]# cat > docker-compose.yml <<-EOF
version: "3.5"
services:
  mule-ce:
    image: wslph/mule:3.9.0-ce
    container_name: mule-ce
    hostname: mule-ce
#    ports:
#      - 7777:7777
#      - 8899:8899
#      - 1099:1099
#      - 5000:5000
    environment:
      - MULE_ESB_NAME=mule-ce
      - MULE_MMC_AGENT_PORT=7777
#      - MULE_MMC_URL=http://mule-server.battle.com/mmc-console
#      - MULE_MMC_USERNAME=admin
#      - MULE_MMC_PASSWORD=safasfsafwq
      - MULE_MMC_AGENT_HOST=10.0.1.2
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /data/volume/mule/apps:/opt/mule/apps:Z
      - /data/volume/mule/domains:/opt/mule/domains:Z
      - /data/volume/mule/conf:/opt/mule/conf:Z
      - /data/volume/mule/logs:/opt/mule/logs:Z
      - /data/volume/mule/patches:/opt/mule/patches:Z
      - /data/volume/mule/.mule:/opt/mule/.mule:Z
    network_mode: host
    restart: always
    tty: true
EOF
]# docker-compose up -d

应用程序部署及验证

放置java应用程序进mulue的程序路径/data/volume/mule/apps

部署ftp

● 部署此应用是提供给开发人员使用,达到开发人员自动部署程序的目的,不需要运维干预

]# mkdir -p /data/deploy/ftp
]# cd /data/deploy/ftp
]# cat > docker-compose.yml <<-EOF
version: "3.5"
services:
  ftp:
    image: fauria/vsftpd
    container_name: ftp
    hostname: ftp
    ports:
      - 30020-30021:20-21
      - 21100-21110:21100-21110
    environment:
      - FTP_USER=sky
      - FTP_PASS=skyfasf14
      - PASV_ADDRESS=10.0.1.2
      - PASV_MIN_PORT=21100
      - PASV_MAX_PORT=21110
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /data/volume/mule/apps:/home/vsftpd/sky:Z
    restart: always
    tty: true
EOF
]# docker-compose up -d

结语

dockerhub wslph/mule
mule 官网

上一篇:iOS开发中,应用内直接跳转到Appstore


下一篇:在线预览word,excel,ppt