在Linux系统上将我的生产Rails应用程序部署到的合理且逻辑目录应该是什么?
一些候选人...
/var/rails <= There's a /var/www so this would be consistent with that
pattern. But I.T. guys have complained about stuff in /var
before.
/home/my_home_dir/rails <= OK, not /var, but I'm not the only developer.
Seems like it really ought to be a systemwide
location.
/home/rails <= I don't know. That just seems weird.
/rails <= Seems even weirder.
在这里要做的最不惊奇,最正常的事情是什么?
(背景信息-Rails应用是一堆用Ruby编写的服务器端代码,以及一个public
包含JavaScript,CSS以及可能包含一些HTML的public
目录。该目录已映射到Apache虚拟主机。Apache通过模块处理Ruby代码称为乘客或mod_rails
。)
谢谢大家的帮助。我想我要去了/opt/deployed_rails_apps
。(我喜欢长的,说明性的目录名和制表符补全。)/var/...
也是一个好地方,但是当我尝试在其中部署内容时,我已经从IT那里苦苦挣扎。如果是我自己的机器,我可能会选择/var
或/srv
。