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.
Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option. The default development environment can be changed using -e .
On Ubuntu, /srv
is 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-data
is perfect for running your app (when running apache, that's the default user). With Passenger, you can set PassengerDefaultUser www-data
in its config file to enable that.
Do NOT run your app in as root
. It's very dangerous.
/var/rails/app_name/current
and deploy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With