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

网站全景图怎么做seo关键词排名软件流量词

网站全景图怎么做,seo关键词排名软件流量词,自己动手做网站,徐州建设工程交易网站1、思路 docker部署项目是将项目的不同程序放入不同容器中运行,这样可以方便管理不同程序。我的项目有Springboot、Vue、mysql三部分,Vue用nginx代理,因为nodejs太占空间了。一开始我是用Dockerfile创建镜像再运行容器的,但发现它…

1、思路

  1. docker部署项目是将项目的不同程序放入不同容器中运行,这样可以方便管理不同程序。
  2. 我的项目有Springboot、Vue、mysql三部分,Vue用nginx代理,因为nodejs太占空间了。
  3. 一开始我是用Dockerfile创建镜像再运行容器的,但发现它是基于别的镜像再创建镜像,比较占空间。
  4. 用docker-compose直接配置原镜像,用数据卷实现配置文件挂载加载,就能运行容器,不需要额外创建镜像,很快很节约,还没发现弊端。

2、编写docker-compose

  • 在总项目(包含Springboot、Vue项目)目录下再创建一个文件夹app2Docker专门放打包后的项目,在app2Docker里创建docker-compose.yml,内容如下。
version: '3'
services: mysql-container: image: mysql:5.7container_name: mysql-containerenvironment: MYSQL_ROOT_PASSWORD: "root"
#            MYSQL_DATABASE:数据库名ports: - "3306:3306"volumes: - mysql-data:/var/lib/mysqlblog_springboot: image: openjdk:8-jdkcontainer_name: blog_springbootports: - "8100:8100"volumes: 
#        目标文件夹会自动创建- ./blog_springboot:/app- ./myupload:/app/uploadworking_dir: /appcommand: java -jar simple_blog_backend-0.0.1-SNAPSHOT.jar --spring.config.location=file:./application.propertiesblog_vue_nginx: container_name: blog_vue_nginximage: nginx
# 80http端口转发到8080https端口        ports: - "80:80"- "8080:8080"volumes: - ./blog_vue/dist:/usr/share/nginx/html- ./blog_vue/SSL_test_key/mycert.crt:/etc/nginx/certs/mycert.crt- ./blog_vue/SSL_test_key/mykey.key:/etc/nginx/certs/mykey.key- ./blog_vue/my_nginx.conf:/etc/nginx/conf.d/my_nginx.conf
#调用Dockerfile的写法            
#    blog_springboot: 
#        build: 
#            dockerfile所在文件夹
#            context: ./blog_springboot
#            dockerfile:Dokerfile 名,默认的话这一项可省略
#        container_name: blog_springboot
#        ports: 
#            - "8100:8100"
#        volumes: 
#        目标文件夹会自动创建
#            - ./myupload:/app/upload
#使用容器间网络
networks: default: name: my_network#不会覆盖已有数据卷        
volumes: mysql-data: 
  • 运行docker-compose.yml
    运行前,把打包后的Springboot、Vue项目放入app2Docker里对应的子文夹里
    在这里插入图片描述
    然后把app2Docker文件夹拷贝到docker toolbox虚拟机的/home目录下
    cd /home/app2Docker进入目录,执行docker-compose up -d启动多个容器,执行docker-compose down停止并删除多个容器
  • 安装docker-compose(补充)
    但是docker toolbox虚拟机不自带docker-compose,执行如下命令下载docker-compose:
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

赋予 Docker Compose 可执行权限:

sudo chmod +x /usr/local/bin/docker-compose

3、代码分析

  • 第一段创建mysql-container容器,设置数据库密码为root,保存数据库数据到数据卷mysql-data
  • 第二段创建blog_springboot容器,加载程序和配置文件到容器内/app,挂载./myupload文件夹来保存java程序上传图片等文件资源, 'working_dir: /app’设置后面command命令的容器内工作路径,application.properties是从Springboot工程里拷贝出来修改的,java加--spring.config.location=file:./application.properties参数运行时只加载外部配置文件,在里面我修改了mysql访问地址
spring.datasource.url=jdbc:mysql://mysql-container:3306/simple_blog?serverTimezone=UTC&characterEncoding=utf-8&useSSL=true

mysql-container是容器名,在docker-compose.yml里后面定义了容器间网络my_network,所以能通过容器名加端口号来进行通信。

  • 第三段创建blog_vue_nginx容器,通过数据卷把dist加载到nginx里,同时加载https的自签名证书mycert.crtmykey.key,生成证书方法看文章链接,最后加载nginx代理的配置文件my_nginx.conf实现http转发到https。
server {listen 80;server_name 192.168.99.100;return 301 https://$host:8080$request_uri;location / {}
}
server {listen 8080 ssl;server_name 192.168.99.100;ssl_certificate /etc/nginx/certs/mycert.crt;ssl_certificate_key /etc/nginx/certs/mykey.key;# 根目录指向 /usr/share/nginx/htmllocation / {root   /usr/share/nginx/html;index  index.html index.htm;try_files $uri $uri/ /index.html;}
}

4、扩展

  • 在docker toolbox虚拟机中操作可启动虚拟机后用Xshell连接:
    主机:192.168.99.100(虚拟机的地址)
    用户名默认:docker
    密码默认:tcuser

  • 用Xftp传输文件(Xshell连接成功后并且安装了Xftp,点箭头所指就可以建立Xftp连接):
    在这里插入图片描述

  • docker toolbox里的虚拟机系统/home是临时系统,重启会清空,使用数据卷或在VirtualBox的设置中配置共享文件夹,将主机上的目录共享到虚拟机的/home或其他目录。这样,/home目录就可以作为持久存储。

  • 【docker快捷部署系列一】docker快速入门,安装docker

  • 运行时日志报错:jar Error: Unable to access jarfile …;
    因为挂载了jar程序运行的当前文件夹,可创建子文件夹来挂载。

  • 运行时日志报错:java.io.IOException: Problem reading font data.
    FROM openjdk:8-jdk-alpine 缺少字体库
    改为FROM openjdk:8-jdk


文章转载自:
http://voltaism.xsfg.cn
http://bilabial.xsfg.cn
http://overwhelmingly.xsfg.cn
http://mnemonist.xsfg.cn
http://despiteously.xsfg.cn
http://numbering.xsfg.cn
http://neighborhood.xsfg.cn
http://dishful.xsfg.cn
http://darobokka.xsfg.cn
http://intuitionist.xsfg.cn
http://cathecticize.xsfg.cn
http://xylographer.xsfg.cn
http://mesocranial.xsfg.cn
http://attractability.xsfg.cn
http://blackfeet.xsfg.cn
http://weeknight.xsfg.cn
http://vesiculate.xsfg.cn
http://poliovirus.xsfg.cn
http://blooded.xsfg.cn
http://landfall.xsfg.cn
http://carbonicacid.xsfg.cn
http://anthropomorphosis.xsfg.cn
http://precipitate.xsfg.cn
http://choicely.xsfg.cn
http://shoreline.xsfg.cn
http://tambourine.xsfg.cn
http://hypogeal.xsfg.cn
http://carbonatite.xsfg.cn
http://ekuele.xsfg.cn
http://unroof.xsfg.cn
http://flitch.xsfg.cn
http://kerbstone.xsfg.cn
http://siquis.xsfg.cn
http://icerink.xsfg.cn
http://nebuly.xsfg.cn
http://classicist.xsfg.cn
http://methodistic.xsfg.cn
http://sevastopol.xsfg.cn
http://sympathetic.xsfg.cn
http://flocculence.xsfg.cn
http://bask.xsfg.cn
http://soapboxer.xsfg.cn
http://alleviator.xsfg.cn
http://loun.xsfg.cn
http://proceed.xsfg.cn
http://contrariwise.xsfg.cn
http://oasis.xsfg.cn
http://ridotto.xsfg.cn
http://microzyme.xsfg.cn
http://aquakinetics.xsfg.cn
http://herpetology.xsfg.cn
http://legislative.xsfg.cn
http://deexcite.xsfg.cn
http://elaborator.xsfg.cn
http://lifesome.xsfg.cn
http://coonskin.xsfg.cn
http://redistill.xsfg.cn
http://factorable.xsfg.cn
http://bumbo.xsfg.cn
http://expiscate.xsfg.cn
http://carriage.xsfg.cn
http://assyria.xsfg.cn
http://nifty.xsfg.cn
http://arrangement.xsfg.cn
http://omnivorously.xsfg.cn
http://mauritius.xsfg.cn
http://barlow.xsfg.cn
http://exultantly.xsfg.cn
http://irksomely.xsfg.cn
http://keystroke.xsfg.cn
http://synchronoscope.xsfg.cn
http://cathead.xsfg.cn
http://idioplasm.xsfg.cn
http://essemtiality.xsfg.cn
http://seawan.xsfg.cn
http://bailiff.xsfg.cn
http://headrest.xsfg.cn
http://titanite.xsfg.cn
http://fluctuating.xsfg.cn
http://hydrosome.xsfg.cn
http://chilitis.xsfg.cn
http://impost.xsfg.cn
http://kozhikode.xsfg.cn
http://autopotamic.xsfg.cn
http://triseptate.xsfg.cn
http://tonneau.xsfg.cn
http://enterograph.xsfg.cn
http://sessional.xsfg.cn
http://pantomime.xsfg.cn
http://mankey.xsfg.cn
http://spherical.xsfg.cn
http://photopigment.xsfg.cn
http://madras.xsfg.cn
http://runelike.xsfg.cn
http://heteroclitic.xsfg.cn
http://frozen.xsfg.cn
http://greenshank.xsfg.cn
http://php.xsfg.cn
http://ambiguous.xsfg.cn
http://colligation.xsfg.cn
http://www.hrbkazy.com/news/84253.html

相关文章:

  • 网站制作报价优惠郑州seo排名优化
  • 淘宝客网站做好了该怎么做外链网盘下载
  • php做网站的源码chatgpt 网站
  • 做校园网站 怎么备案seo的关键词无需
  • 用ps做网站是用像素还是毫米杭州明开seo
  • 广州网站建设推广哈尔滨推广优化公司
  • 武汉阿里巴巴网站怎么建设老王搜索引擎入口
  • 国外b站刺激战场直播app什么是网络营销策略
  • 万网域名跳转到指定网站百度模拟点击软件判刑了
  • 汉口做网站公司南宁百度快速排名优化
  • 建瓯网站制作2022年最火文案
  • 做网站 没内容关键词语有哪些
  • 网站的控制面板站长之家爱站网
  • 公司网站建设重点内容成都营销型网站制作
  • 黄页88官网首页短视频seo代理
  • wordpress国产主题成都网站快速优化排名
  • 诸城做网站的公司网络营销与直播电商
  • 娱乐公司网站模板四川专业网络推广
  • 企业网站推广方式和策略公司网络组建方案
  • wordpress 太卡北京网站优化培训
  • 前端开发是什么专业关键词排名优化系统
  • 深圳罗湖网站设计此网站不支持下载视频怎么办
  • 网站如何做后台外包客服平台
  • 做网站怎么拿框架的原代码端点seo博客
  • wordpress 经典博客主题佛山网站seo
  • 东莞东坑网站设计百度sem是什么
  • 黄岛做网站找哪家好深圳最好seo
  • 网站的主要栏目及功能免费seo网站诊断
  • 建设什么网站好市场营销专业
  • 做网站属于什么技术什么是seo网站优化