Closed lpzdvd-packlink closed 4 years ago
Solved: https://github.com/GoogleCloudPlatform/community/issues/351#issuecomment-370056462
Unfortunately, during the build phase, the CloudSQL connection is not available.
That's why I'm only allowed to execute a migrate command from app container after a deployment. artisan migrate can not be run from composer.json.
Definitely it should be in the PHP docs regarding App Engine since I've read a lot of articles and issues trying to use migrate in gloud app deploy
commands. It was very strange because cloudsql proxy container logs stated that it was ready to accept connections but none was ever made. app deploy command throwed SQLSTATE[HY000] [2002] No such file or directory errors.
Really tricky anyway.
@lpzdvd-packlink Were you ever able to automate migrations after deploying?
Hi everybody,
Unfortunately I'm another user trying to deploy a laravel 5.8 app on AE flex. I'm surprised about huge amount of people failing in same point, discussing about beta_settings, double quotes and all kind of things. After countless hours of attempts and lectures I've realized that /cloudsql socket is not present in any instance, so regarding of other configuration it seems to be a huge problem. This is my config:
database.php
app.yaml
MySQL user setup
If I ssh into instance, /cloudsql folder does not exist. No socket present, all kind of errors related to socket no found / SQLSTATE[HY000] [2002] No such file or directory
side notes:
Cloud SQL Admin API is enabled
I've granted service-@gae-api-prod.google.com.iam.gserviceaccount.com Cloud SQL Admin role (also tried earlier to use client without success)
I've granted@appspot.gserviceaccount.com Cloud SQL client role
What else can I do?
Thank you much, Regards