I am using gem capistrano-env and found a little problem. My deployment script:
Capistrano::Env.use do |env| env.add 'DB_DSN', 'mysql:host=localhost;dbname=dbname' env.add 'DB_USER', 'user' env.add 'DB_PASS', 'pass' end
And this code creates the .env file on the server after deployment. But! .env File permissions are 640, and my PHP script cannot read it. I can run the chmod after each deployment, but is there probably another nice solution?
EDIT
I created a pull request and added a new filemode parameter to this gem. So now the solution is:
Capistrano::Env.use do |env| env.add 'DB_DSN', 'mysql:host=localhost;dbname=dbname' env.add 'DB_USER', 'user' env.add 'DB_PASS', 'pass' env.filemode = 0644 end
source share