Basic tutorial for flexible environment of Google App Engine

This article shows basic tutorial for flexible environment of Google App Engine(GAE) on Google Computing Platform(GCP).

🎉 Advanced Preparation

Download and install Google Cloud SDK:

# 初期化
gcloud init

gcloud components install docker-credential-gcr
# which gcloud and find "bin/docker-credential-gcr" from the path
# Set shortcuts like / usr / local / bin with ln -s to .zshrc or .bashrc

gcloud auth configure-docker

# logging into GCR
docker-credential-gcr gcr-login

# set configuration to Docker
docker-credential-gcr configure-docker

😼 Quick Start

Create Dockerfile

Create Dockerfile with listing port 8080.

Create app.yml

Create gcloud-app.yml.

runtime: custom
env: flex
enable_health_check: False

instances: 1
cpu: 1
memory_gb: 0.5
disk_size_gb: 10

More Detail:

Deploy the app

# build docker image
docker build -t sample-app:latest -f docker/Dockerfile .

# set tag
docker tag sample-app:latest

# push image
docker push

# deploy to feature-2 env
gcloud app deploy gcloud-app.yml --project=gcp-project-sample

Browse the app

gcloud app browse

🐝 References

🖥 Recommended VPS Service

VULTR provides high performance cloud compute environment for you. Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour). In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!