Flexible env: post-deploy-cmd from composer.json it not being executed

640 views
Skip to first unread message

Søren Malling

unread,
Sep 21, 2017, 10:29:35 AM9/21/17
to Google App Engine
I have the following composer.json

{
  "name": "project/platform",
 
"config": {
    "vendor-dir": "Packages/Libraries",
   
"bin-dir": "bin"
  },
 
"require": {
    "php": "7.0.*",

   
"ext-redis": "*",

   
"neos/flow": "^4.2"
  },
 
"scripts": {
    "post-update-cmd": "Neos\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
   
"post-install-cmd": "Neos\\Flow\\Composer\\InstallerScripts::postUpdateAndInstall",
   
"post-package-update": "Neos\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
   
"post-package-install": "Neos\\Flow\\Composer\\InstallerScripts::postPackageUpdateAndInstall",
   
"post-deploy-cmd": [
      "php flow flow:cache:flush",
     
"php flow doctrine:migrate",
     
"php flow flow:cache:warmup",
     
"php flow flow:core:compile",
     
"php flow flow:doctrine:compileproxies"
    ]
  }
}

But even though following the laravel and symfony example, the post-deploy-cmd commands are not being executed, when the deployment finishes. 

There is not output or exception in the part where  the scripts should be executed, from the deployment log

Step #1:  ---> Running in 853fb060c40d
Step #1: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Step #1: nginx: configuration file /etc/nginx/nginx.conf test is successful
Step #1:  ---> fef460171ebf
Step #1: Removing intermediate container 853fb060c40d
Step #1: Step 10/10 : RUN /bin/bash /build-scripts/lockdown.sh
Step #1:  ---> Running in af19870aff23
Step #1: Locking down the document root...
Step #1:  ---> 53834d04b298

It should be in between the two command above.

Are there any requirements that I should be aware of?

Shivam(Google Cloud Support)

unread,
Sep 21, 2017, 3:11:56 PM9/21/17
to Google App Engine
Google Groups discussion forum is meant for open-ended discussions. 

The referred tutorials are submitted by the community and do not represent official Google Cloud Platform product documentation. Therefore, I would recommend to post the issues on the respective github pages for Laravel and Symfony.

Takashi Matsuo

unread,
Sep 21, 2017, 8:25:32 PM9/21/17
to Google App Engine
I said this in another thread, but let me repeat here as well.

The new build pipeline for App Engine Flex for PHP, doesn't run `post-deploy-cmd` any more.
You may be able to just use `post-install-cmd` as a drop-in replacement, unless you need DB connection.

So Søren, unfortunately for your case, you have to remove the db migration from the script. However, other tasks should work fine with changing it to `post-install-cmd`.

For tasks like db migration, please use cloud_sql_proxy locally. We're planning to provide a nicer solution, but that's all we have today.

--
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 google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
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/dacb7479-f8fd-4961-97dd-8c9e48bdc306%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
-- Takashi
Reply all
Reply to author
Forward
0 new messages