Created
July 3, 2012 09:55
-
-
Save giosakti/3038811 to your computer and use it in GitHub Desktop.
[DELETED] anotasi deploy.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/capistrano' | |
# use rvm | |
set :rvm_ruby_string, 'ruby-1.9.3-p194@unm' | |
# set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") | |
set :rvm_type, :system | |
require 'rvm/capistrano' | |
load "config/recipes/base" | |
load "config/recipes/mysql" | |
load "config/recipes/unm_sso_resource" | |
load "config/recipes/redis" | |
load "config/recipes/starqle_auth" | |
load "config/recipes/nginx" | |
load "config/recipes/unicorn" | |
set :app, "unm" # JANGAN DIGANTI! | |
set :application, "skripsi_unm_ac_id" # nama dengan domain, dipisahkan underscore (sesuai dengan domain yang nanti dipake di server) | |
set :application_host, "skripsi.unm.ac.id" # idem sama yang diatas, tapi dipisahkan . (titik) | |
set :application_repo, "unm_final_project_information_system" # nama di repo sesuai bitbucket | |
# primary database | |
set :mysql_host, "localhost" # host mysql di server23, kemungkinan besar localhost | |
set :mysql_user, "unm" # user mysql | |
set :mysql_database, "skripsi" # database mysql | |
# redis database | |
set :redis_database, 0 # ga usah diganti, redis kan sekarang sama semua | |
# sso server | |
set :custom_provider_url, "http://eoffice.unm.ac.id/" # ini tempat sso servernya.. kalau server 23 bener eoffice ya.. | |
# sso database | |
set :mysql_sso_host, "192.168.2.213" # host database sso, di server23 karena sama berarti localhost ya | |
set :mysql_sso_user, "unm_sso_guest" # user database sso | |
set :mysql_sso_password, "unm_sso_guest" # pass database sso | |
set :mysql_sso_database, "sso_server_development" # nama database sso | |
# source # bagian ini ga usah diganti... | |
set :scm, :git | |
set :repository, "[email protected]:starqle/#{application_repo}.git" | |
set :branch, "master" | |
# destination | |
server "192.168.2.233", :web, :app, :db, :primary => true # server yang dituju sama capistrano, dalam hal ini berarti 118.97.32.23 | |
ssh_options[:port] = 22 | |
ssh_options[:keys] = "~/.vagrant.d/insecure_private_key" # private key yang dipake buat akses si server 23, berarti harus dibikinin sistem otentikasi dulu nih ... | |
ssh_options[:forward_agent] = true | |
set :user, "vagrant" # user yang dipake buat ngedeploy.. ini apa baiknya.. starqle? ga boleh sama sama nginx atau www-data, kalau belum ada nanti bisa gw buatin | |
set :group, "vagrant" # idem sama yang diatas | |
set :deploy_to, "/var/www/#{application}" | |
# options | |
set :deploy_via, :remote_cache | |
set :use_sudo, false | |
default_run_options[:pty] = true | |
set :bundle_without, [:development] | |
after "deploy", "deploy:cleanup" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment