This is a how to question as not many information is available. I do, however, took the time out to investigate and tried their simple Hello World app which works great.
Now I tried to use Polymer Starter Kit git clone along with the Hello World tutorial, except for the git clone.
In my testapp folder, for the starter kit, I have added an app.yaml
. Inside has the same config as the hello world:
runtime: nodejs
vm: true
api_version: 1
To deploy: gcloud preview app deploy app.yaml --set-default
After all that has completed, it gave me the url to preview the app. Note that the starter kit works on my local machine. The url gave me 503. So I waited for an hour and same 503. In my Dev Console - VM Instances, under Name, I see many instances. Is that correct? Is there a tutorial to get the starter kit on Google Cloud Platform running on nodejs?
As far as I know, the Polymer Starter Kit runs via gulp serve
when in development, and that will be listening on a port like 5000 or 7000. If you read the Custom Runtimes or Managed VMs docs, you'll see that by default, requests to your app are routed to port 8080. However, you shouldn't run the development server in production. You should actually build the project and serve from the build version.
Instead of gulp serve
, you should rather just run gulp
to build and vulcanize the project. The dist/
folder will then contain the version of your app ready to deploy, and you'll need to look into that folder and realize that it's meant to be served as a static website. You therefore shouldn't need to use nodejs to serve it, and you'll save a ton of money from having everything in the static files network edge-cache, and not needing to use any real instance compute power.
You can find online examples of app.yaml files which can be used to deploy a static website on App Engine without the need to use any dynamic instances to serve anything.