diff --git a/source/posts/2013-09-10-capistrano-ile-multistage-deploy.html.md b/source/posts/2013-09-10-capistrano-ile-multistage-deploy.html.md new file mode 100644 index 00000000..0cafc51f --- /dev/null +++ b/source/posts/2013-09-10-capistrano-ile-multistage-deploy.html.md @@ -0,0 +1,77 @@ +--- +title: Capistrano ile Multistage Deploy +date: 2013-09-10 23:48 UTC +tags: capistrano, deploy, ruby on rails +--- + +Ürünlerimizi geliştirme aşamasında production ve staging olarak iki sunucuya deploy ediyoruz. Hafta bitiminde yaptığımız işleri staging sunucusuna deploy edip test edilmesini bekliyoruz. Onay geldiğinde ise production sunucusuna gönderiyoruz. + +Deploy işlermlerinde bildiğiniz gibi capistrano kullanıyoruz. İşlemleri halihazırda capistrano kullandığınızı düşünerek anlatacağım. + +`config/deploy.rb` ye capistrano multistage extension ekliyoruz. + + # config/deploy.rb + require 'capistrano/ext/multistage' + + +ve hangi stage ler olacağını belirtiyoruz + + # config/deploy.rb + set :stages, %w(staging production) + + +config altına deploy adında bir klasör oluşturup içerisine `production.rb` ve `staging.rb` dosyalarını oluşturuyoruz. + + # config/deploy/staging.rb + server "156.0.0.0", :web, :app, :db, primary: true + set :port, 1234 + set :rails_env, 'staging' + + namespace :deploy do + task :setup_config, roles: :app do + # Staging + sudo "ln -nfs #{current_path}/config/nginx.conf /etc/nginx/sites-enabled/#{application}" + + sudo "ln -nfs #{current_path}/config/unicorn_init_#{rails_env}.sh /etc/init.d/unicorn_#{application}" + end + end + + # config/deploy/production.rb + server "156.0.0.0", :web, :app, :db, primary: true + set :port, 1234 + set :rails_env, 'production' + + namespace :deploy do + task :setup_config, roles: :app do + # Production + sudo "ln -nfs #{current_path}/config/nginx-ssl.conf /etc/nginx/sites-enabled/#{application}" + + sudo "ln -nfs #{current_path}/config/unicorn_init_#{rails_env}.sh /etc/init.d/unicorn_#{application}" + end + end + + +Kodlardan da anlaşılacağı gibi birbirinden farklı olacak şeyleri ayrı dosyalara taşıdık. Ortak olanlar ise `deploy.rb` de kalıyor. + +Deploy kodunuda şu şekilde çalıştırıyoruz. + + cap production deploy + cap staging deploy + + +veya + + # config/deploy.rb + set :default_stage, "staging" + + +default stage belirtip + + cap deploy + + +yapıyoruz. + +Kolaylıklar dilerim. + +[Muhammet DİLEK](http://twitter.com/muhammetdilek) \ No newline at end of file diff --git a/source/posts/2013-09-27-paperclip-gemi-ile-resimlere-watermark-ekleme.html.md b/source/posts/2013-09-27-paperclip-gemi-ile-resimlere-watermark-ekleme.html.md index f739d19b..975df454 100644 --- a/source/posts/2013-09-27-paperclip-gemi-ile-resimlere-watermark-ekleme.html.md +++ b/source/posts/2013-09-27-paperclip-gemi-ile-resimlere-watermark-ekleme.html.md @@ -86,4 +86,6 @@ Eğer daha önce upload ettiğiniz resimlere de watermark'ınızın eklenmesini rake'ini çalıştırmanız yeterlidir. - [1]: https://github.com/thoughtbot/paperclip \ No newline at end of file + [1]: https://github.com/thoughtbot/paperclip + + [Hamit Türkü KAYA](http://twitter.com/hamitturkukaya) \ No newline at end of file diff --git a/source/posts/2013-10-26-3d-karakter-modelleme-ve-animasyon-outsource-is-ilani.html.md b/source/posts/2013-10-26-3d-karakter-modelleme-ve-animasyon-outsource-is-ilani.html.md index c7f56a67..becc1e90 100644 --- a/source/posts/2013-10-26-3d-karakter-modelleme-ve-animasyon-outsource-is-ilani.html.md +++ b/source/posts/2013-10-26-3d-karakter-modelleme-ve-animasyon-outsource-is-ilani.html.md @@ -95,3 +95,5 @@ Teklifinizin 2. aşamaya geçmesi halinde proje detaylarını sizinle paylaşaca [11]: http://www.imdb.com/media/rm285643776/tt0479952 [12]: http://www.imdb.com/media/rm235312128/tt0479952 [13]: http://www.lab2023.com/wp-content/uploads/2013/10/3d_modelleme_ve_animasyon_isleri_outsource.pdf + +[Tayfun Öziş ERİKAN](http://twitter.com/toziserikan) \ No newline at end of file diff --git a/source/posts/2013-11-04-2d-karakter-tasarimi-ve-animasyon-outsource-is-ilani.html.md b/source/posts/2013-11-04-2d-karakter-tasarimi-ve-animasyon-outsource-is-ilani.html.md index eada73c3..397c30ae 100644 --- a/source/posts/2013-11-04-2d-karakter-tasarimi-ve-animasyon-outsource-is-ilani.html.md +++ b/source/posts/2013-11-04-2d-karakter-tasarimi-ve-animasyon-outsource-is-ilani.html.md @@ -21,3 +21,5 @@ Merhaba, İlgilenen arkadaşlar bize **0 258 215 5010** nolu telefondan veya **Tayfun Öziş ERİKAN - tayfun.ozis.erikan[at]lab2023.com** adresinden konu hakkında iletişime geçebilirler. [1]: http://www.lab2023.com/3d-karakter-modelleme-ve-animasyon-outsource-is-ilani + +[Tayfun Öziş ERİKAN](http://twitter.com/toziserikan) \ No newline at end of file diff --git a/source/posts/2013-12-10-using-medium-editor-as-input-field-in-rails.html.md b/source/posts/2013-12-10-using-medium-editor-as-input-field-in-rails.html.md index 2d267b19..c1e31b52 100644 --- a/source/posts/2013-12-10-using-medium-editor-as-input-field-in-rails.html.md +++ b/source/posts/2013-12-10-using-medium-editor-as-input-field-in-rails.html.md @@ -38,4 +38,7 @@ When you create a MediumEditor object with '.editable' class, all elements (exce Real magic we'll use is "bind" method of HTML elements. (Also I must warn you that you must include standard jQuery libraries). When a editable class element is changed, inner code of bind method will run. This way we'll get the editable element's ***data-field-id*** and concatenate it with "#post_" string. -Then we set the value of "#post_element" with editable class element's inner HTML. If you keep the names of hidden element and editable section same, you get a polymorphic synchronization. So you can use multiple Medium Editor input fields. \ No newline at end of file +Then we set the value of "#post_element" with editable class element's inner HTML. If you keep the names of hidden element and editable section same, you get a polymorphic synchronization. So you can use multiple Medium Editor input fields. + + +[Ahmet Sezgin DURAN](http://twitter.com/@marjinal1st) \ No newline at end of file diff --git a/source/posts/2014-03-03-sass-nedir-ozellikleri-nelerdir.html.md b/source/posts/2014-03-03-sass-nedir-ozellikleri-nelerdir.html.md index cc151a43..55a5c8af 100644 --- a/source/posts/2014-03-03-sass-nedir-ozellikleri-nelerdir.html.md +++ b/source/posts/2014-03-03-sass-nedir-ozellikleri-nelerdir.html.md @@ -127,3 +127,5 @@ Css çıktısı: float: right; width: 31.25%; } + +[Safiye Sepetçi](http://twitter.com/safiyesepetci) \ No newline at end of file