easy-deploy-bundle icon indicating copy to clipboard operation
easy-deploy-bundle copied to clipboard

Configuration file path

Open mpiot opened this issue 4 years ago • 1 comments

Hi everyone, I've a little suggest about the configuration path, in my Symfony 5 project the Bundle search config in:

  config/
      packages/
      prod/
          deploy.php <- Here
      routes/
      secrets/
      staging/
          deploy.php <- Here
      bootstrap.php
      bundles.php
      routes.yaml
      services.yaml

It would seem preferable to :

  config/
      packages/
      routes/
      secrets/
      bootstrap.php
      bundles.php
      deploy_prod.php <- Here
      deploy_staging.php <- Here
      routes.yaml
      services.yaml

Or :

  config/
      deployments/ <- Same as packages/
          prod/
              deploy.php <- Here
          staging/
              deploy.php <- Here
      packages/
      routes/
      secrets/
      bootstrap.php
      bundles.php
      routes.yaml
      services.yaml

This is write in EasyCorp\Bundle\EasyDeployBundle\Helper, the default behavior (LEGACY_CONFIG_DIR) is the one I expect, but 3 years ago a change was made to use subdir to put deploy.php inside a subdir. Someone know why this change was made ?

mpiot avatar Jun 08 '20 13:06 mpiot

I agree, also in the configuration example the path suggested is app/config/deploy_prod.php, but in reality when you run the deploy command in it says There is no config file to deploy 'env' env.

From the suggestions @mpiot gave above, I'll prefer config/deployments/ structure.

nacholibre avatar Jun 10 '20 08:06 nacholibre