capistrano / symfony

Capistrano tasks for deploying the Symfony standard edition
MIT License
353 stars 65 forks source link

Symfony 4 directory structure #83

Closed TNAJanssen closed 6 years ago

soullivaneuh commented 6 years ago

Any help needed to maintain this repository? 4.0 is now stable, it would be great to have this update soon.

will-in-wi commented 6 years ago

To my knowledge, none of the active Capistrano maintainers use Symfony. This makes it really tricky to verify correctness of pull requests and reproduce issues.

What would be tremendously helpful in this case is:

Prometee commented 6 years ago

There is some work to do to add symfony_directory_structure > 3.4 but I don't know what to do with sensio_distribution_version (I don't use this for now)

Work on Symfony 3.4 project and should work with 4.X because 3.4 has the same directory structure :

set :symfony_directory_structure, 3
set :sensio_distribution_version, 5

set :app_path, nil
set :web_path, "public"

set :app_config_path, nil
set :log_path,  fetch(:var_path) + "/log"

set :controllers_to_clear, []

set :assets_install_path, fetch(:web_path)

set :linked_dirs, [fetch(:log_path)]
Prometee commented 6 years ago

But you have to manage :

soullivaneuh commented 6 years ago

See also #85

Nyholm commented 6 years ago

I will brush up my ruby skills and try to look into to this. I've just gotten the responsibility of the merge button. Any PRs are welcome.

xavismeh commented 6 years ago

Required changes I had to do using the RC3 in the deploy.rb file:

set :linked_files, ['.env']
set :composer_install_flags, '--no-interaction --quiet --optimize-autoloader'
  1. First line overrides the list of shared files across releases. I did reset that list instead of overriding it (fetch(:linked_files)) because we do not have the app/config/parameters.yml file anymore, which is default value in this release.

  2. Second line will remove the default --no-dev flag from the composer install command, which will allow to have symfony/dotenv package installed and avoid missing environment variables definitions error. That's obviously not an optimal solution, but to make it cleaner, I'd recommend to move symfony/dotenv lib in the require block instead of the require-dev, which is the default definition.

Otherwise, no problem encountered with default settings \o/

Nyholm commented 6 years ago

Okey. Thank you.

Yeah, one should rather move symfony/dotenv to require.

xavismeh commented 6 years ago

I will personally go for this yes :)

xavismeh commented 6 years ago

Maybe this issue could be closed, couldn't it ?

Nyholm commented 6 years ago

I'll keep it open until a PR is merged. It is good for a reference.

xavismeh commented 6 years ago

Is that something we want to do? Removing the --no-dev flag during composer install or moving symfony/dotenv to require block is a decision that would probably need to be taken at a project level but not in the tool, WDYT ?

dachinat commented 6 years ago

I was getting serious error with Monolog (Memory allocation exhausted) and spent a lot of time investigating. This occurs if var/log is a linked directory. Don't know how you managed to have it linked.

xavismeh commented 6 years ago

@dachinat if it can help, the only settings regarding the logs folder I have were/are the following:

set :log_path, "var/log"
set :file_permissions_paths, [fetch(:log_path), fetch(:cache_path)]
Nyholm commented 6 years ago

Lets fix this now!