DockerCompose方式部署springboot前后端分离项目
服务编排方式部署
以下文件具体目录
1、构建springboot后台服务dockerfile文件,vim /usr/local/docker/soc/Dockerfile
FROM jdk:8MAINTAINER sinvie.cnADD ScgService.jar /root/ScgService.jarENTRYPOINT ["nohup","java","-jar","/root/ScgService.jar","&"]
2、利用Docker Compose 搭建 后台服务 ,vim /usr/local/docker/soc/docker-compose.yml
version: "1.0"?services:? redis: image: redis:5.0 container_name: redis50 volumes: - /usr/local/docker/redis50/conf/redis.conf:/etc/redis/redis.conf - /usr/local/docker/redis50/data:/data command: - redis-server - /etc/redis/redis.conf ports: - 6379:6379? mysql: image: mysql:5.7.30 container_name: mysql57 volumes: - /usr/local/docker/mysql57/conf/my.cnf:/etc/mysql/my.cnf - /usr/local/docker/mysql57/data:/var/lib/mysql - /usr/local/docker/mysql57/logs:/logs environment: MYSQL_ROOT_PASSWORD: 123456 ports: - 3306:3306 soc: build: /usr/local/docker/soc container_name: soc depends_on: - mysql - redis ports: - 8888:8888
3、运行docker-compose.yml
docker-compose -p zongzhi -f docker-compose.yml up -d
4、安装nginx镜像
参考上一篇
5、安装fastdfs镜像
相关推荐
王道革 2020-11-25
bwyyziq 2020-11-22
pigsmall 2020-11-19
changecan 2020-11-19
helloWorldAndYou 2020-11-16
nginxs 2020-11-14
红石丶 2020-11-13
WanKaShing 2020-11-12
yangkang 2020-11-12
滴水穿石点石成金 2020-11-12
张荣珍 2020-11-12
wuxunanjing 2020-11-11
魅惑青花瓷 2020-11-11
lihongtai 2020-11-09
yangkang 2020-11-09
worldsnow 2020-11-06
MichaelJScofield 2020-11-06
TaoTaoFu 2020-11-06