1

So I have the following in my Composer file:

  "scripts": {
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
      "@php craft setup/welcome"
    ],
    "post-update-cmd": [
      "@php craft migrate/all",
      "@php craft project-config/sync",
      "@php craft clear-caches/compiled-templates",
      "@php craft clear-caches/cp-resources",
      "@php craft clear-caches/data",
      "@php craft clear-caches/seomatic-frontendtemplate-caches",
      "@php craft clear-caches/seomatic-metabundle-caches",
      "@php craft clear-caches/seomatic-sitemap-caches",
      "@php craft clear-caches/temp-files",
      "@php craft clear-caches/template-caches"
    ],
    "post-install-cmd": [
      "@php craft migrate/all",
      "@php craft project-config/sync",
      "@php craft clear-caches/compiled-templates",
      "@php craft clear-caches/cp-resources",
      "@php craft clear-caches/data",
      "@php craft clear-caches/seomatic-frontendtemplate-caches",
      "@php craft clear-caches/seomatic-metabundle-caches",
      "@php craft clear-caches/seomatic-sitemap-caches",
      "@php craft clear-caches/temp-files",
      "@php craft clear-caches/template-caches"
    ]
  }

and on my deployment (deployHQ) I have the following SSH command:

cd %path% 
composer install

However, sync changes (project-config/sync) doesn't take effect and each time I have to manually click the button. Any ideas what I am missing in the process?

4
  • Is there anything in DeployHQ's deployment report/log? Can you see it successfully running the sync command?
    – Alex Roper
    Commented Mar 16, 2019 at 0:40
  • Only log I get back from DeployHQ is this; Assume it won't log these commands as they are via the composer script? Commented Mar 16, 2019 at 14:58
  • Run these commands when I manually run composer install via SSH. I have just updated composer, so I wonder if that has resolved this. I will test this out on Monday. Commented Mar 16, 2019 at 15:11
  • 1
    @TerryUpton: did you get this solved? Commented Sep 3, 2020 at 9:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.