Deploy an application with a custom environment to Google Cloud
Folk and clone this repo: https://github.com/hangnhat57/compute-engine-101/
Open Terminal and cd to the folder you’ve just cloned
First, let’s try to run the app on a local machine to verify it has worked:
Open your browser and navigate to http://localhost:8080, you’ll see something like this:
This application is serving inside a container which was customized from scratch:
To deploy a custom container to App Engine, we have to use Google App Engine Flex – Custom Environment. By default, App Engine will serve container application in port 8080, so remember when you create an image.
App.yaml file will look like this :
Now, on the terminal, start a command:
If this is the first time you using App Engine for the current project, Google will ask you for the region of App Engine service:
Select the region you want and wait until it finishes. Then use this command to view your app on the public:
A browser would automatically open and navigate to your app:
Have you read the previous post of the Google Cloud Series? Make sure you check it right now
Comment below or email us via email@example.com if you have any question or want to have free consultation!