|
|
il y a 3 semaines | |
|---|---|---|
| public | il y a 2 mois | |
| src | il y a 3 semaines | |
| .browserslistrc | il y a 2 mois | |
| .editorconfig | il y a 2 mois | |
| .env.development | il y a 2 mois | |
| .env.production | il y a 2 mois | |
| .eslintrc.js | il y a 2 mois | |
| .gitignore | il y a 2 mois | |
| Dockerfile | il y a 3 semaines | |
| README.md | il y a 3 semaines | |
| babel.config.js | il y a 2 mois | |
| build.sh | il y a 2 mois | |
| docker-compose.yml | il y a 3 semaines | |
| package.json | il y a 1 mois | |
| vue.config.js | il y a 1 mois |
.env.development 和 .env.production 环境文件中分别配置开发环境和生产环境的后端接口
docker build -t ops-app:12345678
使用 .env.production 文件中的配置
构建后生成的结果在 dist 目录中
docker compose up -d
npm run serve
启动服务后打开浏览器,访问 http://localhost:4040
server {
listen 4040;
access_log off;
root /opt/webroot;
location / {
try_files $uri $uri/ /index.html;
}
}
root 指令的路径指向 dist 目录的绝对路径