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
| Vagrant::Config.run do |config| | |
| config.vm.define :numpla01 do |cfg| | |
| cfg.vm.box = "geerlingguy/centos6" | |
| cfg.vm.host_name = "numpla01" | |
| cfg.vm.network :hostonly, "192.168.30.10" | |
| end | |
| config.vm.define :numpla02 do |cfg| | |
| cfg.vm.box = "geerlingguy/centos6" | |
| cfg.vm.host_name = "numpla02" | |
| cfg.vm.network :hostonly, "192.168.30.20" |
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
| # Start Puma with next command: | |
| # RAILS_ENV=production bundle exec puma -C ./config/puma.rb | |
| # uncomment and customize to run in non-root path | |
| # note that config/puma.yml web path should also be changed | |
| application_path = "#{File.expand_path("../..", __FILE__)}" | |
| # The directory to operate out of. | |
| # | |
| # The default is the current directory. |
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
| #!/bin/bash | |
| # | |
| # puma-myproject | |
| # chkconfig: 2345 82 55 | |
| # processname: puma-myproject | |
| # description: Runs puma-myproject for nginx integration. | |
| # Include RedHat function library | |
| . /etc/rc.d/init.d/functions |
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
| user nginx; | |
| worker_processes 2; | |
| error_log /var/log/nginx/error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include /etc/nginx/mime.types; | |
| default_type application/octet-stream; |
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 'capistrano/setup' | |
| require 'capistrano/deploy' | |
| require 'capistrano/rails' | |
| require 'capistrano/rails/assets' | |
| require 'capistrano/rails/migrations' | |
| require 'capistrano/rbenv' | |
| require 'capistrano/bundler' | |
| require 'capistrano/puma' | |
| require 'capistrano/git' |
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
| server 'numpla01', port: 2222, user: 'vagrant', roles: %w{web app db}, ssh_options: { | |
| keys: %w{/Users/yamaya/Desktop/dimage/vagrant/.vagrant/machines/numpla01/virtualbox/private_key}, | |
| forward_agent: true, | |
| auth_methods: %w{publickey}, | |
| } | |
| server 'numpla02', port: 2200, user: 'vagrant', roles: %w{web app db}, ssh_options: { | |
| keys: %w{/Users/yamaya/Desktop/dimage/vagrant/.vagrant/machines/numpla02/virtualbox/private_key}, | |
| forward_agent: true, | |
| auth_methods: %w{publickey}, | |
| } |
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
| upstream puma { | |
| server unix:/srv/www/numpla/shared/tmp/sockets/numpla-puma.sock; | |
| } | |
| server { | |
| listen 80 default_server deferred; | |
| root /srv/www/numpla/current/public; | |
| access_log /srv/www/numpla/current/log/nginx.access.log; | |
| error_log /srv/www/numpla/current/log/nginx.error.log info; |
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
| octopus: | |
| replicated: true | |
| environments: | |
| - development | |
| development: | |
| d01: | |
| host: localhost | |
| adapter: mysql2 | |
| database: appname_development_m01 | |
| s01: |
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
| source 'https://rubygems.org' | |
| gem 'rails', '4.2.1' | |
| gem 'sqlite3' | |
| gem 'mysql2' | |
| gem 'sass-rails', '~> 5.0' | |
| gem 'uglifier', '>= 1.3.0' | |
| gem 'coffee-rails', '~> 4.1.0' | |
| gem 'jquery-rails' | |
| gem 'turbolinks' |
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
| namespace :shards do | |
| def databases | |
| databases = [] | |
| hash = YAML::load(File.read("#{Rails.root}/config/shards.yml")) | |
| data = hash['octopus'][Rails.env] | |
| data.each do |key, val| | |
| val.each do |key2, val2| | |
| if key2 == 'database' | |
| databases << val2 | |
| elsif val2.is_a?(Hash) |
OlderNewer