简体   繁体   English

将 Meteor 部署到 Google App Engine 2017

[英]Deploy Meteor to Google App Engine 2017

So I am trying to deploy a simple meteor app to Google App Engine.所以我正在尝试将一个简单的流星应用程序部署到 Google App Engine。 I've tried following this tutorial https://cloud.google.com/community/tutorials/run-meteor-on-google-app-engine But it resulted in error: Can't find npm module 'meteor-deque'. Did you forget to call 'Npm.depends' in package.js within the 'meteor' package?我试过按照本教程https://cloud.google.com/community/tutorials/run-meteor-on-google-app-engine但是它导致error: Can't find npm module 'meteor-deque'. Did you forget to call 'Npm.depends' in package.js within the 'meteor' package? error: Can't find npm module 'meteor-deque'. Did you forget to call 'Npm.depends' in package.js within the 'meteor' package? Googling resulted in a few more tutorials but via their comments it seems they are outdate as well.谷歌搜索导致了更多的教程,但从他们的评论来看,它们似乎也已经过时了。 There is also this one https://medium.com/google-cloud/meteor-google-a-devops-post-b8a17f889f84 However this is about deploying to the compute engine, so this is a plan B. So I wander if any of you successfully deployed Meteor to GAE recently in 2017 with Meteor 1.4?还有这个https://medium.com/google-cloud/meteor-google-a-devops-post-b8a17f889f84但是这是关于部署到计算引擎的,所以这是一个计划 B。所以如果有的话我会徘徊你们中有谁最近在 2017 年使用 Meteor 1.4 成功地将 Meteor 部署到 GAE? Can you please share details?你能分享细节吗?

Thanks to kiyohiko from meteor forums.感谢流星论坛的 kiyohiko。

https://forums.meteor.com/t/deploy-meteor-to-google-app-engine-2017/36171/4 https://forums.meteor.com/t/deploy-meteor-to-google-app-engine-2017/36171/4

Here are the configs that worked for me这是对我有用的配置

app.yaml应用程序.yaml

env: flex
runtime: custom
threadsafe: true
automatic_scaling:
  max_num_instances: 1
env_variables:
  ROOT_URL: https://<gae-app-name>.appspot.com
  MONGO_URL: mongodb://<mongodb-username>:<mongodb-password>@<gce-ip>:27017/<mongodb-name>
  DISABLE_WEBSOCKETS: "1"
skip_files:
- ^(.*/)?\.dockerignore$
- ^(.*/)?\npm-debug.log$
- ^(.*/)?\yarn-error.log$
- ^(.*/)?\.git$
- ^(.*/)?\.hg$
- ^(.*/)?\.svn$

Dockerfile文件

FROM launcher.gcr.io/google/nodejs
RUN install_node v4.6.2
COPY . /app/
RUN (cd programs/server && npm install --unsafe-perm)
CMD node main.js

Steps to deploy部署步骤

$> meteor build ../ --directory --architecture os.linux.x86_64 --server-only
$> cp app.yaml ../bundle/ && cp Dockerfile ../bundle/
$> cd ../bundle && gcloud app deploy --verbosity=info -q

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM