【发布时间】:2018-06-29 17:53:13
【问题描述】:
我正在构建我的第一个 Vue.js 网络应用程序。 我已经使用以下方法设置了一个新项目:
vue init webpack <project_name>
我已经完成了一些工作,几乎所有事情都按照我的意愿进行(除了 sass,但这是另一个故事)。 我现在想将我的 webapp 部署到谷歌应用引擎。 我在 GAE 上创建了一个新的 node.js 项目。 我已经创建了我的 app.yaml(见下文)。 我用通常的方式部署
gcloud app deploy --project="<project_name>"
但是在很长一段时间(~5-8分钟)后部署失败
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [4] Your deployment has
failed to become healthy in the allotted time and therefore was
rolled back. If you believe this was an error, try adjusting the
'app_start_timeout_sec' setting in the 'readiness_check' section.
我目前的项目结构是:
- 构建/
- 配置/
- 分布/
- index.html
- 静态
- css/
- 图片/
- js/
- 节点模块/
- 源/
- 组件/
- scss/
- App.vue
- main.js
- 静态/
- package.json
- babel.rc
- index.html
- app.yaml
我的 app.yaml 是:
runtime: nodejs
env: flex
handlers:
- url: /
static_files: dist/index.html
upload: dist/index.html
- url: /(.*)
static_files: dist/\1
upload: dist/(.*)
【问题讨论】:
标签: node.js google-app-engine deployment webpack vue.js