I’ve always deployed my apps to ~/apps/myApp/current (with Capistrano, that’s why I have the current directory).
But I’ve seen users deploy to like /var/www/, or even some make a directory at the root, /myapp.
I’m wondering is there an ideal place to put my app? Or does it not matter at all.
Additionally what do you usually name your user, I’m using deploy as my username and group, but I’ve seen users use rails or just whatever the username they always use is.
Is there a rule of thumb here? I’m aware that some may see this as a subjective question, I just wanted to get a little census as to what most people do.
On Ubuntu,
/srvis a good place to install a rails app. Do not put it in/var/www, people would be able to browse your app sources in some circumstances.The user
www-datais perfect for running your app (when running apache, that’s the default user). With Passenger, you can setPassengerDefaultUser www-datain its config file to enable that.Do NOT run your app in as
root. It’s very dangerous.