| .vscode | ||
| public | ||
| server | ||
| src | ||
| .dockerignore | ||
| .env | ||
| .gitignore | ||
| auto-imports.d.ts | ||
| components.d.ts | ||
| docker-compose.yml | ||
| Dockerfile | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| vite.config.js | ||
Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.
Docker HTTPS 部署(Linux)
服务直接通过 HTTPS 对外提供前端、API 和 WebSocket,不占用 443 端口。部署前修改 .env:
VITE_SERVICE_PORT=5175
HTTPS_CERT_FILENAME=你的证书文件.pem
HTTPS_KEY_FILENAME=你的私钥文件-key.pem
证书和私钥应位于 Linux 的 /home/cmvr/zh/mkcert 目录中,该目录会以只读方式挂载到容器。然后执行:
docker compose up -d --build
docker compose logs -f app
访问地址为 https://<Linux主机IP>:<VITE_SERVICE_PORT>。请确保防火墙已放行该端口,并且证书包含实际访问时使用的域名或 IP。