Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Symfony 3 directory structure #31

Closed
sandermarechal opened this issue Nov 4, 2014 · 12 comments
Closed

Support Symfony 3 directory structure #31

sandermarechal opened this issue Nov 4, 2014 · 12 comments

Comments

@sandermarechal
Copy link

Please support the Symfony 3 directory structure: http://stackoverflow.com/questions/23993295/what-is-the-new-symfony-3-directory-structure

This can be as easy as adding a var_path and bin_path, where cache_path and log_path depend on the var_path, and symfony_console_path depends on bin_path. For a Symfony 2 project, var_path and bin_path should be equal to app_path. For a Symfony 3 structured project they should be var and bin respectively.

@peterjmit
Copy link
Contributor

👍 I have some changes to make to how we resolve app_path and web_path for a better developer experience, so I can roll these into a PR together.

I am not sure which should be the default however.

@sandermarechal
Copy link
Author

I would leave Symfony 2 structure the default for now. Setting up a project using Symfony 3 structure is an explicit action in the Symfony Standard distribution. Most projects will default to the old structure.

@webdevilopers
Copy link

👍

@blaugueux
Copy link
Contributor

+1 :)

@garak
Copy link

garak commented Apr 10, 2015

👍

2 similar comments
@ZeeCoder
Copy link

👍

@feyyazesat
Copy link

+1

@feyyazesat
Copy link

is there any workaround guys ? I did like this https://gist.github.com/feyyazesat/18daf74bae3454919ff5
but it gives me following Error. It is interesting it can work for php bin/console but not for cache and logs. I'm not a ruby programmer. There may be easy way to handle it ?

ERROR Cannot change permissions: /path/to/releases/20150526172544/app/cache is not a file or directory
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: Exception while executing as [email protected]: Cannot change permissions: /path/to/releases/20150526172544/app/cache is not a file or directory

SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: Cannot change permissions: /path/to/releases/20150526172544/app/cache is not a file or directory

Capistrano::FileNotFound: Cannot change permissions: /path/to/releases/20150526172544/app/cache is not a file or directory/

Tasks: TOP => symfony:set_permissions
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as [email protected]: Exception while executing as [email protected]: Cannot change permissions: /path/to/releases/20150526172544/app/cache is not a file or directory

@Marcpepe
Copy link

Marcpepe commented Aug 6, 2015

You can override console, logs and cache paths which have changed in the new S3 structure by adding the following to your deploy.rb.

set :symfony_console_path, 'bin/console'
set :log_path, 'var/logs'
set :cache_path, 'var/cache'

@leonnleite
Copy link

+1

@peterjmit
Copy link
Contributor

Fixed in #50

@anoop-digitalassess
Copy link

The following code will help you deploy symfony3 structure.

ruby-1.9.3-p551, Gem file details below

source 'http://rubygems.org'
gem 'capistrano', "~> 2.15.5"

gem 'capifony'
gem 'capistrano_rsync_with_remote_cache'
gem 'capistrano-multistage'

set :symfony_console, 'bin/console'
set :permission_method,         :acl
set :use_set_permissions,       true
set :writable_dirs,     ["var/logs", "var/cache"]

# Symfony application path
set :app_path,              "app"

# Symfony web path
set :web_path,              "web"

# Symfony var path
set :var_path,              "var"

# Symfony log path
set :log_path,              fetch(:var_path) + "/logs"

# Symfony cache path
set :cache_path,            fetch(:var_path) + "/cache"

# Symfony config file path
set :app_config_path,       fetch(:app_path) + "/config

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants