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

广东如何进行网站制作排名鲜花电商网站开发

广东如何进行网站制作排名,鲜花电商网站开发,红孩子母婴网站开发背景,制作软件教程作者 | togettoyou来源 | SuperGopher前言本文主要分享个人服务器的应用部署方案现状#xff0c;容器化代理网关可视化管理。准备阶段我购买的是腾讯云服务器#xff08;2 核 4GB 3Mbps#xff09;域名也是在腾讯云备案过的#xff0c;提前准备域名解析配置环境安装 Docker… 作者 | togettoyou来源 | SuperGopher前言本文主要分享个人服务器的应用部署方案现状容器化代理网关可视化管理。准备阶段我购买的是腾讯云服务器2 核 4GB 3Mbps域名也是在腾讯云备案过的提前准备域名解析配置环境安装 Dockercurl -sSL https://get.daocloud.io/docker | sh安装 Docker Composecurl -L https://get.daocloud.io/docker/compose/releases/download/1.29.2/docker-compose-uname -s-uname -m  /usr/local/bin/docker-compose chmod x /usr/local/bin/docker-compose设置镜像加速和开机自启mkdir /etc/docker echo {registry-mirrors:[https://reg-mirror.qiniu.com/]}  /etc/docker/daemon.json sudo systemctl daemon-reload sudo systemctl restart docker sudo systemctl enable docker部署 Traefik创建 Traefik 目录并在该目录下进行系列操作cd ~ mkdir traefik cd traefik/创建 Traefik 的启动配置vi traefik.yml# 定义监听端口web(80) 和 websecure(443) entryPoints:web:address: :80websecure:address: :443 # 配置发现提供者这里为 docker providers:docker: {} # 开启 Traefik 面板访问 (8080端口) api:dashboard: trueinsecure: true # 创建名称为 open-https 的  tls 配置会使用 Lets Encrypt 自动生成 https 证书 certificatesResolvers:open-https:acme:email: youremailqq.comstorage: acme.jsonhttpChallenge:entryPoint: web创建名称为 traefik 的 Docker 网络环境后续 Traefik 和需要代理的应用容器都需要部署在该网络环境下才可以被访问到docker network create traefik创建 docker-compose 配置vi docker-compose.ymlversion: 3 services:traefik:image: traefik:v2.4# 需要将本地的 /var/run/docker.sock 挂载到 Traefik 容器内才可以使用到 docker 配置发现volumes:- /var/run/docker.sock:/var/run/docker.sock- $PWD/traefik.yml:/etc/traefik/traefik.ymlrestart: always# 把 Traefik 容器监听的 80 和 443 端口映射到宿主机以后宿主机只要暴露 80 和 443 就可以了所有流量通过 Traefik 代理ports:- 80:80- 443:443# 使用自定义的 traefik 网络networks:- traefik# 标签配置Traefik 的配置发现是通过标签抓取的labels:# 开启 redirectscheme 中间件中间件名称为 redirect-https 该中间件可以重定向 http 到 https 达到强制 https 的目的- traefik.http.middlewares.redirect-https.redirectscheme.schemehttps# 配置一个名称为 traefik-service 的服务容器内端口为 8080- traefik.http.services.traefik-service.loadbalancer.server.port8080# 配置一个名称为 https-traefik 的路由代理服务为 traefik-service# 监听域名为 traefik.togettoyou.com 端口为 websecure (443) 的流量请求# 开启 tls 使用 open-https 自动签发证书- traefik.http.routers.https-traefik.servicetraefik-service- traefik.http.routers.https-traefik.ruleHost(traefik.togettoyou.com)- traefik.http.routers.https-traefik.entrypointswebsecure- traefik.http.routers.https-traefik.tlstrue- traefik.http.routers.https-traefik.tls.certresolveropen-https# 配置一个名称为 http-traefik 的路由代理服务为 traefik-service# 监听域名为 traefik.togettoyou.com 端口为 web (80) 的流量请求# 使用 redirect-https 中间件将 http 请求重定向到 https即重定向到了上面配置的 https-traefik 路由- traefik.http.routers.http-traefik.servicetraefik-service- traefik.http.routers.http-traefik.ruleHost(traefik.togettoyou.com)- traefik.http.routers.http-traefik.entrypointsweb- traefik.http.routers.http-traefik.middlewaresredirect-httpsnetworks:traefik:external: true启动 Traefikdocker-compose up -d访问 http://traefik.togettoyou.com 时会发现被 302 重定向到了 https://traefik.togettoyou.com 并且自动配置了证书查看面板也可以发现和我们预期的一致部署 Docker 可视化工具Portainer 是一个 Docker 的可视化图形工具。同理我们创建 Portainer 目录并在该目录进行系列操作cd ~ mkdir portainer cd portainer/创建 docker-compose 配置vi docker-compose.ymlversion: 3 services:portainer:image: portainer/portainer-ce# 挂载 /var/run/docker.sock 并持久化 portainer 数据volumes:- /var/run/docker.sock:/var/run/docker.sock- $PWD/data:/datarestart: always# 使用自定义的 traefik 网络networks:- traefiklabels:# 配置一个名称为 portainer-service 的服务容器内端口为 9000- traefik.http.services.portainer-service.loadbalancer.server.port9000# 配置一个名称为 https-portainer 的路由代理服务为 portainer-service# 监听域名为 docker.togettoyou.com 端口为 websecure (443) 的流量请求# 开启 tls 使用 open-https 自动签发证书- traefik.http.routers.https-portainer.serviceportainer-service- traefik.http.routers.https-portainer.ruleHost(docker.togettoyou.com)- traefik.http.routers.https-portainer.entrypointswebsecure- traefik.http.routers.https-portainer.tlstrue- traefik.http.routers.https-portainer.tls.certresolveropen-https# 配置一个名称为 http-portainer 的路由代理服务为 portainer-service# 监听域名为 docker.togettoyou.com 端口为 web (80) 的流量请求# 使用 redirect-https 中间件将 http 请求重定向到 https即重定向到了上面配置的  https-portainer 路由- traefik.http.routers.http-portainer.serviceportainer-service- traefik.http.routers.http-portainer.ruleHost(docker.togettoyou.com)- traefik.http.routers.http-portainer.entrypointsweb- traefik.http.routers.http-portainer.middlewaresredirect-httpsnetworks:traefik:external: true启动 Portainerdocker-compose up -d查看面板访问 docker.togettoyou.com总结利用 Docker Traefik Portainer 极大方便了我们个人服务器应用部署。Traefik 监听着 80 和 443 端口因此服务器只需要暴露出这两个端口其他的流量请求都交由 Traefik 来代理基于 Traefik 的配置发现机制在部署我们的容器应用时只要在 Label 加上 Traefik 的规则即可对于容器应用的启动停止、日志查看等使用 Portainer 绰绰有余几乎不需要登陆到服务器上操作查看。往期推荐Spring 完美导入 IDEAk8s集群居然可以图形化安装了使用这个库让你的服务操作 Redis 速度飞起将 k8s 制作成 3D 射击游戏好玩到停不下来点分享点收藏点点赞点在看
http://www.pierceye.com/news/620090/

相关文章:

  • 怎么把网站推广wordpress 百万数据
  • 乐陵市人力资源中心网站网站的内容和功能
  • wordpress网站搬家图片路径做网站的算什么行业
  • 个人网站logo重庆网络优化平台
  • 河南 网站建设静态网站是什么意思
  • 上海正规做网站公司电话基于flash网站设计
  • 每个城市建设规划在哪个网站wordpress 无法安装主题
  • 自建网站做外贸谷歌推广网站内部资源推广方法
  • 网站数据库5g一个人看的免费视频高清直播
  • 怎么做网站注册推广泰州网站建设费用
  • 找南阳建立网站的公司网址大全最新版的
  • 网站建设与维护就业前景小程序开发外包注意事项
  • 胶州网站建设哪里有天润网站建设
  • 网站备案 怎么加搜索引擎网站建设
  • 做外贸自己开公司网站网站建设三个友好
  • 深圳高端品牌网站设计网站建设实训报告收获
  • 万虹点读机如何做系统下载网站网站seo的重要性
  • 同一家公司可以做几个网站吗铁岭网站开发公司
  • 网站推广费用大概需要多少钱个人二级网站怎么做
  • 查询企业的网站有哪些山东平台网站建设找哪家
  • 如何推广外贸型网站wordpress本地环境迁移
  • 网站建设国内外现状网站建设公司 网络服务
  • 百度网站首页福田时代汽车官方网站
  • 网站建设智推网深圳进出口贸易有限公司
  • 网站开发语言pwordpress v4.9.5
  • 东莞建站模板源码东莞注塑切水口东莞网站建设
  • 做文案策划需要看什么网站服装网站开发目的
  • 湖北定制型网站建设微信公众平台网页版
  • 需要做网站的公司有哪些免费网页模板之家
  • 淘客网站怎么备案合肥在线官网