代码拉取完成,页面将自动刷新
Configure multi-pages applications and code splitting
pnpm install
npm run dev
npm run build:dev
npm run build:test
npm run build:prod
npm run preview
# 构建 docker build
docker build ./ -f test.Dockerfile -t vite-multi-pages:v1
# 查看 images
docker images -a | findstr vite
# 运行 docker run
docker run -itd vite-multi-pages:v1 -n vite-multi-pages -p 8080:80
# 查看 docker ps -a
docker ps -a | findstr vite
# 1.配置环境变量 如:static为上传到cdn的目录
VITE_APP_CDN_URL=www.xxx.com/static/
# 2.更新dockerfile
RUN apk add --no-cache wget && wget https://gosspublic.alicdn.com/ossutil/1.7.13/ossutil64 && chmod 755 ossutil64 && ./ossutil64 config -e oss-cn-shanghai.aliyuncs.com -i yourSecret -k yourKey
# 3.更新nginx.conf
# 1.域名配置
your domain ---> nginx server(如:10.12.18.0:80)
# 2.代理转发
your domain/path ---> nginx server(/path) ---> proxy_pass ---> cdn url
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。