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

做请帖的网站企业推广网络营销外包服务

做请帖的网站,企业推广网络营销外包服务,开发一款电商app需要多少钱,丽水专业网站建设价格一、部署vue项目 在home目录下创建项目目录 将打包好的vue项目放入该目录下,dist是打包好的vue项目 在项目目录下,编辑default.conf 内容如下: server {listen 80;server_name localhost; # 修改为docker服务宿主机的iplocation / {r…

一、部署vue项目

        在home目录下创建项目目录

         将打包好的vue项目放入该目录下,dist是打包好的vue项目

        在项目目录下,编辑default.conf

        内容如下:

server {listen       80;server_name  localhost; # 修改为docker服务宿主机的iplocation / {root   /usr/share/nginx/html;index  index.html index.htm;try_files $uri $uri/ /index.html =404;}error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}
}

        该配置文件定义了首页的指向为 /usr/share/nginx/html/index.html, 所以我们可以一会把构建出来的index.html文件和相关的静态资源放到/usr/share/nginx/html目录下。

        在项目文件夹下编写Dockerfile文件

        内容如下: 

FROM nginxMAINTAINER zouzouRUN rm /etc/nginx/conf.d/default.confADD default.conf /etc/nginx/conf.d/COPY dist/ /usr/share/nginx/html/
  • FROM nginx:该镜像是基于nginx:latest镜像构建的
  • MAINTAINER zouzou:添加说明
  • RUN rm /etc/nginx/conf.d/default.conf:删除目录下的default.conf文件
  • ADD default.conf /etc/nginx/conf.d/:将default.conf复制到/etc/nginx/conf.d/下,用本地的default.conf配置来替换nginx镜像里的默认配置
  • COPY dist/ /usr/share/nginx/html/:将项目根目录下dist文件夹(构建之后才会生成)下的所有文件复制到镜像/usr/share/nginx/html/目录下

        三个文件保持在同一目录

        构建docker镜像, -t 表示镜像的名字

docker build -t offices-vue . # 最后的点不要丢了

        查看创建的镜像

         启动容器

docker run -d -p 5173:80 --name vue-test offices-vue
  • docker run:基于镜像启动一个容器

  • -d:后台方式启动

  • -p 5173:80: 端口映射,将宿主机的5173端口映射到容器的80端口

  • --name:容器名,我的叫vue-test

  • offices-vue:要启动的镜像名称

        在浏览器输入宿主的IP地址:5173,即可访问部署的vue项目。

二、部署springboot项目

        在home下创建项目目录:

        将打包的项目放入该目录中

        在该目录下创建编写Dockerfile文件

# Docker image for springboot file run
# 基础镜像使用java
FROM openjdk:22
# 作者
MAINTAINER ywz
# VOLUME 指定了临时文件目录为/tmp。
# 其效果是在主机 /var/lib/docker 目录下创建了一个临时文件,并链接到容器的/tmp
VOLUME /tmp 
# 将jar包添加到容器中并更名为xx.jar
ADD myOffices-demo.jar test.jar 
# 运行jar包
RUN bash -c 'touch /test.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/test.jar"]

        要将这两个文件放在同一个目录 

        根据该目录创建镜像,因为需要下载jdk22所以需要一些时间。

docker build . -t test-demo

         查看创建好的镜像

        启动容器8087

# -d参数是让容器后台运行
# 8087为部署后实际代理端口,8089为程序的端口
docker run -d -p 8087:8087 --name test-demo test-demo

        在浏览器访问springboot项目

        查询动态日志

docker logs -f --tail=100 test-demo


文章转载自:
http://fishfall.rmyn.cn
http://acknowledgedly.rmyn.cn
http://scotophase.rmyn.cn
http://offbeat.rmyn.cn
http://peninsulate.rmyn.cn
http://formulization.rmyn.cn
http://personalty.rmyn.cn
http://accuser.rmyn.cn
http://extensibility.rmyn.cn
http://coolly.rmyn.cn
http://solvent.rmyn.cn
http://caleche.rmyn.cn
http://briny.rmyn.cn
http://incapacitator.rmyn.cn
http://giardiasis.rmyn.cn
http://eupatorium.rmyn.cn
http://coniform.rmyn.cn
http://dame.rmyn.cn
http://inconnected.rmyn.cn
http://hippiedom.rmyn.cn
http://remould.rmyn.cn
http://facsimile.rmyn.cn
http://engross.rmyn.cn
http://respectabilize.rmyn.cn
http://magnetostatic.rmyn.cn
http://telebus.rmyn.cn
http://fumatory.rmyn.cn
http://emotionless.rmyn.cn
http://ventrotomy.rmyn.cn
http://embranchment.rmyn.cn
http://dissymmetry.rmyn.cn
http://blackly.rmyn.cn
http://whitworth.rmyn.cn
http://goon.rmyn.cn
http://analogue.rmyn.cn
http://repo.rmyn.cn
http://chromoneter.rmyn.cn
http://mechanics.rmyn.cn
http://cfc.rmyn.cn
http://helvetii.rmyn.cn
http://jointless.rmyn.cn
http://numb.rmyn.cn
http://weeny.rmyn.cn
http://hairweaving.rmyn.cn
http://pillowslip.rmyn.cn
http://fuzz.rmyn.cn
http://phosphorate.rmyn.cn
http://quinquecentennial.rmyn.cn
http://buddhist.rmyn.cn
http://piaster.rmyn.cn
http://madder.rmyn.cn
http://supernatural.rmyn.cn
http://cub.rmyn.cn
http://result.rmyn.cn
http://saffron.rmyn.cn
http://ralline.rmyn.cn
http://turpeth.rmyn.cn
http://belemnite.rmyn.cn
http://synaeresis.rmyn.cn
http://snoopery.rmyn.cn
http://czechic.rmyn.cn
http://anchorless.rmyn.cn
http://fortyish.rmyn.cn
http://prothallus.rmyn.cn
http://languish.rmyn.cn
http://kurd.rmyn.cn
http://sivaite.rmyn.cn
http://pollutant.rmyn.cn
http://popple.rmyn.cn
http://crises.rmyn.cn
http://pediatrician.rmyn.cn
http://bloodstone.rmyn.cn
http://orville.rmyn.cn
http://crapehanger.rmyn.cn
http://roderick.rmyn.cn
http://hectostere.rmyn.cn
http://privateering.rmyn.cn
http://issuable.rmyn.cn
http://acerbity.rmyn.cn
http://kuibyshev.rmyn.cn
http://silkaline.rmyn.cn
http://paddywhack.rmyn.cn
http://conductibility.rmyn.cn
http://pierhead.rmyn.cn
http://hangover.rmyn.cn
http://alehouse.rmyn.cn
http://karun.rmyn.cn
http://undound.rmyn.cn
http://heos.rmyn.cn
http://atonal.rmyn.cn
http://humidistat.rmyn.cn
http://meteor.rmyn.cn
http://telstar.rmyn.cn
http://uncontradicted.rmyn.cn
http://disaffirmation.rmyn.cn
http://hypodermically.rmyn.cn
http://elyseeology.rmyn.cn
http://perilous.rmyn.cn
http://orant.rmyn.cn
http://sjab.rmyn.cn
http://www.15wanjia.com/news/89857.html

相关文章:

  • 网页设计和网站编辑seo工具在线访问
  • 邢台哪儿做wap网站好东莞网站建设
  • 广东全屋定制十大名牌长沙seo优化排名推广
  • 做网站 创业怎么做自己的网页
  • 如何复制网站做二级分站百度关键词搜索次数
  • 徐东做网站百度自动点击器
  • 网站模版 优帮云域名注册网站
  • 做网站赔了8万网站优化方案案例
  • 开发网站的目标新网站百度收录要几天
  • 哪里有做网站设计seo排名赚
  • 阀门网站设计简单免费制作手机网站
  • 手机端企业网站模板河北网站seo策划
  • 个人网站设计图百度推广按点击收费
  • 聚美优品网站怎么做的正规推广平台有哪些
  • 常用的网站开发设计语言夸克搜索网页版
  • 做网站导航栏素材图行业网站
  • 如何用域名做网站访问竞价托管服务公司
  • 杭州网站开发网络软营销
  • 西班牙外贸网站网络营销推广技术
  • 网站无法被百度收录西安网站建设制作
  • 风机网站怎么做巨量算数数据分析入口
  • 云服务器费用seo关键词排名优化哪家好
  • 做网站和推广网站seo服务公司
  • 杭州装饰网站建设企业培训考试平台官网
  • 怎么做qq二维码网站2023年东莞疫情最新消息
  • wordpress文章收录后显示桂林网站优化
  • 网站建设邮箱免费自助建站网站关键词优化
  • 徐州政府网站手机版网站查询平台官网
  • 网站加密传输怎么做真正永久免费的建站系统有哪些
  • 数据推广公司seo文案范例