Skip to content

a web calculator that can add, subtract, multiply and divide, used to practice how to deploy Rails App.

Notifications You must be signed in to change notification settings

watchsky/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Rails部署Workshop

一个简单地web计算器,用于练习如何部署Rails应用。先用unicorn和Apache+passenger分别部署整个Rails App;

最后再改用nginx做反向代理,Rails应用的主页由nginx代理转发到Apache+passenger部署的server,而实现计算

功能的请求由nginx转发到unicorn server上处理,app用到的静态文件(image、js、css)直接由nginx响应请求。

部署结构图在public/images/structure.jpg里。感兴趣的同学可以把代码下下来练习一下。

1)gem install unicorn
2)在rails app的config文件夹下创建unicorn.rb文件(example  https://github.com/defunkt/unicorn/blob/master/examples/unicorn.conf.rb)
3)运行unicorn(unicorn_rails -c config/unicorn.rb -E development -D)

About

a web calculator that can add, subtract, multiply and divide, used to practice how to deploy Rails App.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published