Giter VIP home page Giter VIP logo

vue3-admin's Introduction

Vue 3 + TypeScript + Vite + Ant-Design-Vue

docker

部署

构建生成前端产物

npm run build

创建 Dockerfile 文件

FROM nginx:stable
COPY ./dist /usr/share/nginx/html

根据 Dockerfile 生成镜像

docker build -t hurole/vue3-admin:1.0.0 .

-t tag 为镜像指定名字和标签(可选),当前镜像名字为 hurole/vue3-admin,tag 为 1.0.0

创建容器并运行

docker run -d -p 8081:80 --name vue3_admin hurole/vue3-admin:1.0.0

-d 指定容器后台运行 -p 设置本机端口与容器端口的映射,当前为本机的 8081 与容器的 80 端口 --name 指定容器的名字

验证

  • 浏览器访问http://localhost:8081
  • 运行 docker ps 查看所有进程中是否存在刚刚的容器vue3_admin
  • 进入容器查看我们的 dist 文件运行docker exec -it vue3_admin bash 执行容器的 bash 命令,-it 指定交互式

自动化

  1. 设置脚本 deploy

vue3-admin's People

Contributors

hurole avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.