Also, in any case, I don't recommend invoking the db migration during the deployment process, because it's dangerous. What happens if the db migration succeeds, and then the deployment fails? Your app will be in a broken state.
So now the recommended way is to use cloud_sql_proxy locally and do the db migration. Yeah it's cumbersome, but it's all we have right now. We're planning to provide a tool that can invoke a script with the deployed image. Please stay tuned. On Thu, Sep 21, 2017 at 10:59 AM Takashi Matsuo <[email protected]> wrote: > Are you trying to do DB migration with the post-deploy-cmd? > > It won't work because we don't run post-deploy-cmd any more, with the new > build pipeline. > > What gcloud version are you using? > > If you're using the old build pipeline (you can do that by setting a flag > `gcloud config set app/use_runtime_builders false`), it still invokes > post-deploy-cmd. > In that case, post-deploy-cmd should be able to access the envvars. > > Can you show me the build logs, or anything that shows how your app is > failing? > > > On Thu, Sep 21, 2017 at 12:03 AM Søren Malling <[email protected]> > wrote: > >> Just le me try and write that again - the last message was unreadable.. >> >> Yes. When trying to run my apllication via the URL, it can't read the env >> and therefore can't access the database. >> And when running post-deploy-cmd from my composer.json (as described for >> the Symfony example), the FLOW_CONTEXT and MYSQL_* enviroment parameters >> are not passed to the processes. >> >> >> >> Den torsdag den 21. september 2017 kl. 08.57.08 UTC+2 skrev Søren Malling: >>> >>> >>> Do you have actual problems connecting to the db? >>>> >>> >>> Yes. My application don't running can't read the env and the when >>> running post-deploy-cmd from my composer.json, the FLOW_CONTEXT and MYSQL_* >>> enviroment parameters are not passed to the processes >>> >>>> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/google-appengine. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/google-appengine/576b9a13-0ff5-451b-8b78-426aeb45a376%40googlegroups.com >> <https://groups.google.com/d/msgid/google-appengine/576b9a13-0ff5-451b-8b78-426aeb45a376%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > -- Takashi > -- -- Takashi -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CADWEYXjrJ1_BhSg6Xe4ri7ozU2AAdjNZGgadpYHuMrAezha4Wg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
