Best deployment strategy for a locally used application in Rails 3.1 on Windows 7?

I am developing 2 applications in Rails 3.1 (there will be an update soon) and noticed that my current strategy has its drawbacks. I am currently doing the following:

  • Work directly in the development directory, you have version control with Git (which works great for me).
  • I defined databases similar (omitted not interesting parts):

    development:
      database: db/dev.db
    production:
      database: db/dev.db
    
  • I have both applications running all the time in production mode, where the ports are defined as 3008 and 3009.

  • From time to time I want to change the little things and start the development server for one of the two applications directly with the default values: rails s thin(port == 3000).

I noticed that the following things do not work very well.

  • CSS Javascript, ( ) .
  • (CSS Javascript) . , .

? . (Capistrano) ? Rake ? - , ( : -))?

+1
2

, , , - . ( ):

  • , . (), . , .
  • . :
    • appA: dev == > 4001, prod == > 3001
    • appB: dev == > 4002, prod == > 3002
    • ...

, . rails/root , :

rails/
  root/
  another/
  ...
  bare/
    root.git/
    another.git/
    ...
  production/
    root/
    another/
    ...
  • 2 , , :
    • mkdir rails/production
    • mkdir rails/bare
    • cd rails/bare
    • git clone ../root --bare
    • cd ../root
    • git remote add bare ../bare/root
    • cd rails/production
    • git clone ../bare/root
    • cd root
    • git remote add bare ../../bare/root
  • ( ) , , Git .
  • () .
  • :
    • root> git push bare
    • root/../production/root> git pull bare
  • () : root> rails s thin -p 4009
  • (): root/../production/root> rails s thin -e production -p 3009

, , , , .

+1

- , . , . git. , , , . . (, , EC2), Capistrano . , Heroku. , , git push, . concurrency Heroku , .

, Windows Rails, Linux. Windows , . Mac Linux. Ubuntu Linux Windows Rails.

0

All Articles