Search code examples
google-app-engine

Is there possibility to host multiple applications with Google App Engine?


Do I need to create for each new Google App Engine app new project? Or is there other way to have multiple apps in one project?

EDIT: removed "extra question"


Solution

  • This is easily done with services. When you deploy to App Engine, define your app.yaml file with a line like: service: my-second-app

    Complete app.yaml file for another Node.js service:

    service: my-second-app
    runtime: nodejs
    env: flex
    automatic_scaling:
       min_num_instances: 1
    

    When you deploy, do it from the directory containing your app.yaml file:

    gcloud app deploy
    

    Or if you want to define your configuration in a YAML file just for your second app:

    gcloud app deploy my-second-app.yaml
    

    The new service will be deployed alongside your default service and will get its own URL like:

    https://my-second-app-dot-my-project-name.appspot.com