-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Hi, I followed steps in Using Cloud SQL for MySQL (App Engine Flexible Environment)
Everything worked and deployed successfully (8 min 21 sec for deploying?!!) until gcloud app browse that goes to the URL with "Internal Server Error" message.
And the log shows Error: connect ECONNREFUSED 127.0.0.1:3306
Question 1: Why does deploy of a simple app take so long to complete even on subsequent runs?
When testing locally using Cloud SQL Proxy we know that 127.0.0.1 is proxied to the Cloud SQL database that we specify in the command line like this:
./cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:3306 -credential_file=$GCLOUD_CERTIFICATE_FILEbut the tutorial does not explain how possibly after deployment it is supposed to connect to the database instance, since we don't have the proxy configuration on the server. And so it fails with the above error as one may expect.
Question 2: How is the app supposed to connect to the sql instance when deployed?
App.flexible.yaml file says "Do not add this file to your source control." Is that really the recommended way to handle app.yaml files? It does not make sense that the application configuration file should be maintained outside of the repository.
Question 3: What is the correct way to manage app.yaml and sensitive data in it?
Thanks!