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

首先确定网站建设的功能定位注册50万公司一年税是多少

首先确定网站建设的功能定位,注册50万公司一年税是多少,代写文章价格表,有项目去哪里找投资人新冠疫情自我检测系统网页设计开发文档 Sylvan Ding 的第一个基于 Vue.js 的项目. 本项目所提供的信息#xff0c;只供参考之用#xff0c;不保证信息的准确性、有效性、及时性和完整性#xff0c;更多内容请查看国家卫健委网站#xff01; Explore the docs View Demo… 新冠疫情自我检测系统网页设计开发文档 Sylvan Ding 的第一个基于 Vue.js 的项目. 本项目所提供的信息只供参考之用不保证信息的准确性、有效性、及时性和完整性更多内容请查看国家卫健委网站 Explore the docs » View Demo · Report Bug · Request Feature 在Docker中运行Vue.js项目开发环境/生产环境 Next, we will run our Vue.js app in a Docker container. Environment Ubuntu18.04.4Docker20.10.18Docker Compose2.10.2 Installation # Install using the convenience script curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh --mirror Aliyun docker -v # 20.10.18 docker compose version # 2.10.2 # Change registry mirrors vim /etc/docker/daemon.json # input the following JSON: {registry-mirrors: [https://docker.mirrors.ustc.edu.cn/, https://registry.docker-cn.com]} sudo systemctl daemon-reload sudo systemctl restart docker docker info # Registry Mirrors: # https://docker.mirrors.ustc.edu.cn/ # https://registry.docker-cn.com/ sudo docker run hello-world # Unable to find image hello-world:latest locally # latest: Pulling from library/hello-world # 2db29710123e: Pull complete # Status: Downloaded newer image for hello-world:latest # Hello from Docker! # This message shows that your installation appears to be working correctly.Build Images and Run Containers of Vue.js App We create Dockerfile for both ‘dev’ and ‘prod’ environment in the root folder of our project. Add a .dockerignore to speed up the Docker build process as our local dependencies and git repo will not be sent to the Docker daemon. docs images README.md .prettierrc node_modules .git .gitignore static/.gitkeepDev We start by creating a Dockerfile.dev in the root folder of our project: # Dockerfile.devFROM node:14.16.1WORKDIR /app# add /app/node_modules/.bin to $PATH ENV PATH /app/node_modules/.bin:$PATH# overwrite Dev Server settings host in config/index.js ENV HOST 0.0.0.0# copy both package.json and package-lock.json (if available) COPY package*.json ./# copy patches before npm runs post-install script COPY patches ./patches# update npm and install project dependencies RUN npm i npm8.18.0 -g RUN npm i vue-cli -g --legacy-peer-deps RUN npm install --legacy-peer-depsEXPOSE 8080# configure anonymous volume in order to # use the container version of the “node_modules” folder VOLUME /app/node_modulesCMD [npm, run, dev]ENV HOST 0.0.0.0 sets the environment variable HOST to the value 0.0.0.0, which overwrites Dev Server settings host in config/index.js. If you keep original settings host: localhost, our Vue.js app in a docker container will not be accessible from outside. By inspecting container exposed port docker container port dockerize-vuejs-app-dev, we get the output 8080/tcp - 0.0.0.0:8080, which means the docker container are listening to inner port 0.0.0.0:8080 instead of localhost:8080. To be more specific, when apps run in a Docker container the IP 127.0.0.1 is assigned to the Docker container, not the host. Changing it to 0.0.0.0 will allow us to directly access the app from the host. COPY patches ./patches aims at providing patches before npm runs post-install script. After patching, you will get the output: Applying patches... element-ui2.15.9 ✔. It may seem reduntant to first copy package.json and package-lock.json and then all project files and folders in two separate steps but there is actually a very good reason for that (spoiler: it allows us to take advantage of cached Docker layers). Now let’s build the Docker image of our Vue.js app: docker build -f Dockerfile.dev -t dockerize-vuejs-app:dev .Finally, let’s run our Vue.js app in a Docker container: docker run -it -p 8080:8080 -v ${PWD}:/app --rm --name dockerize-vuejs-app-dev dockerize-vuejs-app:dev-v ${PWD}:/app mounts our code into the container at “/app” to enable “Hot Reload”. ${PWD} is /path/to/your/project, which may not work on Windows. ( See this Stack Overflow question for more info. ) You should be able to access our Vue.js app on localhost:8080 on your host machine. The logs are as follows: DONE Compiled successfully in 12336ms 3:04:24 AMI Your application is running here: http://0.0.0.0:8080I Your Express app is listening on port 8081N © Sylvan Ding 2022 sylvandingqq.comN https://github.com/sylvanding/Prod For realistically complex production use cases, it may be wiser to stand on the shoulders of some giant like NGINX or Apache and that is exactly what we are going to do next: we are about to leverage NGINX to serve our Vue.js app because it is considered to be one of the most performant and battle-tested solutions out there. We refactor our Dockerfile.dev to use NGINX: # Dockerfile.prod# build stage FROM node:14.16.1 as build-stage WORKDIR /app ENV PATH /app/node_modules/.bin:$PATH COPY package*.json ./ COPY patches ./patches RUN npm i npm8.18.0 -g RUN npm i vue-cli -g --legacy-peer-deps RUN npm install --legacy-peer-deps COPY . . RUN npm run build# production stage FROM nginx:stable-alpine as production-stage COPY --frombuild-stage /app/dist /usr/share/nginx/html EXPOSE 80CMD [nginx, -g, daemon off;]Now let’s build the Docker image of our Vue.js app: docker build -f Dockerfile.prod -t dockerize-vuejs-app:prod .Finally, let’s run our Vue.js app in a Docker container: docker run -it -p 80:80 --rm --name dockerize-vuejs-app-prod dockerize-vuejs-app:prodWe should be able to access our Vue.js app on http://localhost or http://yourPublibIPAddress. Note that you need to open 80 port in your firewall. To run a container in background, we use -d flag instead of --rm: docker run -d -p 80:80 --name dockerize-vuejs-app-prod dockerize-vuejs-app:prodStop and remove that container: docker rm -f dockerize-vuejs-app-prodView Nginx Access Logs Type the following command helps us view Nginx real-time access logs shown on the background container’s virtual screen: docker attach --sig-proxyfalse dockerize-vuejs-app-prodWhat happens there? docker attach attaches your terminal’s standard input, output, and error (or any combination of the three) to a running container using the container’s ID or name. This allows you to view its ongoing output or to control it interactively, as though the commands were running directly in your terminal.--sig-proxyfalse prevents CTRL-c from sending a SIGINT to the container. It allows you to detach from the container with a -d flag and leave it running Nginx continuously by using the CTRL-c key sequence. 转载请注明出处©️ Sylvan Ding 2022
http://www.pierceye.com/news/38752/

相关文章:

  • 做自行车车队网站的名字WordPress给文章添加省份
  • 长春企业自助建站广州市安全教育平台登录
  • 绵阳汽车网站制作wordpress插件ftp
  • 6东莞做网站做地方特产的网站
  • 电商网站如何优化南宁网站开发招聘
  • 做照片书网站申请自己邮箱域名
  • 做网站服务商个人公众号怎么运营
  • 广州网站网站建设湖南建设人力资源网证书查询
  • 北京门户网站网址安阳网约车
  • 成都企业网站开发公司如何推广自己的微信
  • 北京专业网站改版公司wordpress 用户 新增
  • 手机网站北京旅游网站建设ppt
  • 我做的电影网站为什么百度搜索不到html网站怎么进入后台
  • 网站开发学什么语言好十大网红电商
  • 沭阳奥体小区做网站做图表好用网站或软件
  • 西安做网站要多少钱博客网站模板有哪些
  • 网站没有友情链接php网站开发与设计
  • 免费招聘网站推荐工业软件开发平台
  • 个人备案的网站能做什么平台推广员是做什么的
  • 家具公司网站源码已经注册了域名 怎么做网站
  • 秒收录网站对网站开发课程的建议
  • dede网站主页打不开汶上网站制作
  • 做枪网站上海闵行网站建设
  • 青海建设厅的门户网站美食网站开发与设计报告
  • 厦门城乡建设厅网站兰州市官网
  • 推荐常州网站推广wordpress pcdotfan
  • 网站在哪里设置关键字wordpress的固定链接
  • 网站网页设计内容丫个网站建设博客
  • 饰品公司网站建设方案wordpress修改图片地址
  • 做京东电脑端首页链接的网站建公司网站哪家好