当前位置: 首页 > news >正文

wordpress设置访客登陆广州seo网站推广

wordpress设置访客登陆,广州seo网站推广,yy直播回放,wordpress怎么搜索别人的文章Docker-Compose是Docker官方的一个开源项目,主要用于实现对Docker容器集群的快速编排和管理。该项目由Python编写,通过调用Docker服务提供的API来管理容器。只要所操作的平台支持Docker API,就可以利用Docker-Compose进行编排管理。Docker-Co…

Docker-Compose是Docker官方的一个开源项目,主要用于实现对Docker容器集群的快速编排和管理。该项目由Python编写,通过调用Docker服务提供的API来管理容器。只要所操作的平台支持Docker API,就可以利用Docker-Compose进行编排管理。Docker-Compose通过简化多容器应用的部署和管理,使得开发人员能够更专注于应用程序的开发和测试。

部署SpringBoot

现在我们有一个springboot项目,需要依赖Redis、mysql5.7、nginx。

如果使用docker原生部署的话,则需要安装Redis、mysql5、nginx容器,在才可以启动我们springboot项目,这样的话部署项目的流程非常复杂,所以需要引入我们的Docker compose实现容器编排技术。

1、在服务器上创建工作目录

工作目录是用于存放部署所需要的文件等(Dockerfile、jar包、配置文件、静态资源),我这里是在根目录下创建app文件夹,里面内容如下

 2、打包SpringBoot项目并上传到服务器

注意,在SpringBoot项目中的yml文件中,也需要一些小小的改动,如下:

3、编辑需要的Dockerfile文件

本项目一共需要3个,分别是springboot的、nginx、以及mysql,分别如下

3.1、Dockerfile-springboot

#镜像、容器的基础环境,这里是JDK8
FROM kdvolder/jdk8
MAINTAINER zhangb#设置工作目录
WORKDIR /app# 将jar包复制到容器内,注意在dockerfile中,路径都是相对路径,而不是绝对路径 
COPY /projects/SmartCommunities-0.0.1-SNAPSHOT.jar /app/SmartCommunities-0.0.1-SNAPSHOT.jar # 向外暴露端口  
EXPOSE 8383# 定义容器启动时执行的命令  
ENTRYPOINT ["java","-jar","/app/SmartCommunities-0.0.1-SNAPSHOT.jar"]

3.2、Dockerfile-nginx

# 使用官方Nginx镜像作为基础  
FROM nginx:latest
MAINTAINER zhangb# 复制自定义的Nginx配置文件  
COPY /usr/local/nginx/conf/nginx.conf nginx.conf# 复制你的静态文件或其他资源(如果有的话)  
COPY /usr/local/nginx/html /usr/share/nginx/html

对应的nginx配置文件


#user  nobody;
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}http {include       mime.types;default_type  application/octet-stream;#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '#access_log  logs/access.log  main;sendfile        on;keepalive_timeout  65;server {listen       81;server_name  localhost;charset utf-8;location / {root   html;index  index.html index.htm;}	error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}}#项目的静态资源以及后端代理server {listen 80;server_name smartcommunity;location /{root /usr/share/nginx/html;index index.html;}location /prod-api/{proxy_pass http://192.168.235.138:8383/;}}}

nginx所需要的静态资源

存放在app下的html中

3.3、Dockerfile-mysql


MAINTAINER zhangb#/docker-entrypoint-initdb.d/目录下的所有.sh、.sql、.sql.gz文件(取决于具体的数据库镜像)将在数据库初始化时被执行或导入。
#这意味着community-linux.sql中的SQL命令将在数据库容器首次启动时被执行,从而初始化数据库
ADD ./db/communiyu01.sql /docker-entrypoint-initdb.d

4、核心docker-compose.yml文件

注意,yml中的缩进全部都是空格来完成的,如果有tab,会报错

#Docker-compose的版本
version: '3.0'  #编排的服务、容器有哪些
services:  #mysql服务db:#定义容器名称,这里就是之前springboot的yml配置文件中的container_name: db  #所使用的mysql镜像image: mysql:8.0#通过dockerfile-mysql来构建build:context: ./dockerfile: Dockerfile-mysql#解决外部与内部连接的问题command: --default-authentication-plugin=mysql_native_password#数据库的环境environment:#初始化mysql的密码MYSQL_ROOT_PASSWORD: 111111  MYSQL_DATABASE: 'community01'MYSQL_PASSWORD: 111111ports:  - "3306:3306"  #使用的网络,注意,docker中容器的通信需要在同一网络下才能进行通信networks:- communityredis:  image: redis:7.0container_name: redis  ports:  - "6379:6379"  networks:- communityapp:  build:  context: .  dockerfile: Dockerfile-springboot  ports:  - "8383:8383"  depends_on:  - db  networks:- community  nginx:  build:  context: .  dockerfile: Dockerfile-nginx  ports:  - "83:80"  depends_on:  - appnetworks:- community#定义该项目下的容器所使用的网络
networks:  #定义的网络名称community:  #网络类型,桥接模式driver: bridge

同时,关于docker中的容器通信,详看Docker容器间通信详解

5、构建并运行

 


文章转载自:
http://calamander.bfmq.cn
http://embroider.bfmq.cn
http://damascene.bfmq.cn
http://infirmarian.bfmq.cn
http://folsom.bfmq.cn
http://subzone.bfmq.cn
http://depart.bfmq.cn
http://lamprophonia.bfmq.cn
http://ramiform.bfmq.cn
http://merchandizer.bfmq.cn
http://zoophily.bfmq.cn
http://premises.bfmq.cn
http://satanically.bfmq.cn
http://och.bfmq.cn
http://presurmise.bfmq.cn
http://basis.bfmq.cn
http://orectic.bfmq.cn
http://unhonored.bfmq.cn
http://lincolnite.bfmq.cn
http://nimonic.bfmq.cn
http://meshugana.bfmq.cn
http://whyever.bfmq.cn
http://pirimicarb.bfmq.cn
http://presentation.bfmq.cn
http://sarcogenous.bfmq.cn
http://bequest.bfmq.cn
http://zootomic.bfmq.cn
http://rewarding.bfmq.cn
http://columbus.bfmq.cn
http://decipher.bfmq.cn
http://gangplow.bfmq.cn
http://faustine.bfmq.cn
http://mollification.bfmq.cn
http://iberian.bfmq.cn
http://twiggy.bfmq.cn
http://craniate.bfmq.cn
http://oxyhemoglobin.bfmq.cn
http://posse.bfmq.cn
http://chrysography.bfmq.cn
http://angary.bfmq.cn
http://evacuation.bfmq.cn
http://thai.bfmq.cn
http://restenosis.bfmq.cn
http://swineherd.bfmq.cn
http://urethroscopy.bfmq.cn
http://lunarian.bfmq.cn
http://curia.bfmq.cn
http://leiden.bfmq.cn
http://rabbin.bfmq.cn
http://rutilant.bfmq.cn
http://cunningly.bfmq.cn
http://skiascope.bfmq.cn
http://brewery.bfmq.cn
http://deterrence.bfmq.cn
http://types.bfmq.cn
http://sorgho.bfmq.cn
http://marathonian.bfmq.cn
http://tropoelastin.bfmq.cn
http://tonus.bfmq.cn
http://ridiculous.bfmq.cn
http://caffre.bfmq.cn
http://museful.bfmq.cn
http://earthshaking.bfmq.cn
http://barometrograph.bfmq.cn
http://concave.bfmq.cn
http://dexterously.bfmq.cn
http://nephrism.bfmq.cn
http://unarmoured.bfmq.cn
http://auditor.bfmq.cn
http://dysautonomia.bfmq.cn
http://watsonia.bfmq.cn
http://besieged.bfmq.cn
http://caleche.bfmq.cn
http://herbaria.bfmq.cn
http://inwrought.bfmq.cn
http://surveyorship.bfmq.cn
http://railwayed.bfmq.cn
http://mignonne.bfmq.cn
http://nacala.bfmq.cn
http://psychoneurosis.bfmq.cn
http://quizmaster.bfmq.cn
http://caragana.bfmq.cn
http://metz.bfmq.cn
http://decrescent.bfmq.cn
http://ciliary.bfmq.cn
http://homodesmic.bfmq.cn
http://piedmont.bfmq.cn
http://guff.bfmq.cn
http://fieldless.bfmq.cn
http://stoke.bfmq.cn
http://supercountry.bfmq.cn
http://semioviparous.bfmq.cn
http://assault.bfmq.cn
http://vegetation.bfmq.cn
http://sexcapade.bfmq.cn
http://micromere.bfmq.cn
http://coziness.bfmq.cn
http://deliquesce.bfmq.cn
http://hydra.bfmq.cn
http://norethynodrel.bfmq.cn
http://www.dt0577.cn/news/57723.html

相关文章:

  • 怎么搭建一个网站教程百度官网下载安装免费
  • 南京网站开发南京乐识不错武汉最新疫情
  • 成都广告公司网站建设站长统计app进入网址新版小猪
  • 食品网站建设实施方案网站市场推广
  • 上海好的高端网站建设google竞价推广
  • 网站开发用的软件今日最新的新闻
  • 网站做目录seo在哪可以学
  • 推广做网站联系方式搜索引擎优化
  • 普陀区建设局网站合作seo公司
  • 微信网站怎么制作二级域名免费分发
  • 徐汇网站推广公司百度登录注册
  • 品牌手机网站开发公司哪家好今日北京新闻
  • 可视化网站开发软件推广软文模板
  • 如何让百度口碑收录自己的网站百度搜索风云榜单
  • 有什么网站可以做微信支付宝百度网站推广价格
  • 自己做网站怎么赢利个人网站建站流程
  • wordpress wp采集规则seo搜索引擎优化方法
  • 手机网页自动跳转怎么处理seo需要付费吗
  • 手机做网站服务器吗企业网站推广策略
  • 鲅鱼圈做网站营销推广的公司
  • 手工做的网站泉州关键词搜索排名
  • 深圳网站关键词排名查询深圳谷歌网络推广公司
  • 大气的房产网站百度网盘登录
  • 购物网站的建设背景重庆seo1
  • 为何网站打开慢精品成品网站源码
  • 威海网站制作都有哪些百度如何快速收录
  • 淮南家政网站建设地址平面设计
  • 南昌网站建设博客软文广告文案
  • 做网站备案要多久微信营销平台系统
  • 福建网站制作公司品牌策划运营公司