I’m using Capistrano multistage (capistrano-ext) to deploy to staging or production.
The problem is I’m using Passenger in my shared hosting and need to specify the PassengerAppRoot in the public/.htaccess file. Obviously this is different between stages.
How can I keep different “stage-versions” of this file?
I haven’t used capistrano-ext, but I’m assuming somewhere in your Capfile you’ll have the stage as a variable. Let’s assume it’s the variable ‘stage’. Let’s also assume you have the two different versions checked in somewhere in your code (public/.htaccess-{production|staging})
You could set up a task to symlink (or copy) the right file after a deploy: