Skip to content

Instantly share code, notes, and snippets.

View michaeldever's full-sized avatar

Michael Dever michaeldever

  • Analytics Fire
  • Laois
View GitHub Profile
@michaeldever
michaeldever / gemstash_user.sh
Last active July 25, 2017 11:11
Gemstash User Setup
# Set permissions on the keypair
chmod 600 gemstash.pem
# SSH into the Gem Server
ssh -i gemstash.pem ubuntu@$GEMSERVER_IP
# Make sure your Gem Server is up to date
sudo apt-get update && sudo apt-get -y upgrade
# Create a gemstash user
@michaeldever
michaeldever / Gemfile
Last active July 25, 2017 11:13
Gemstash Gemfile
source "https://rubygems.org"
ruby "2.3.4"
group :development do
gem 'capistrano'
gem 'capistrano-bundler'
gem 'capistrano-rvm'
end
@michaeldever
michaeldever / production.rb
Last active July 21, 2017 17:23
Production Configuration
server "$GEMSTASH_IP", user: "gemstash", roles: %w{app}, ssh_options: {
keys: %w('$LOCAL_MACHINE_SSH_PUBLIC_KEY_PATH'), # This could be ~/.ssh/id_rsa.pub
forward_agent: false,
auth_methods: %w(publickey)
}
@michaeldever
michaeldever / gemstash.yml
Last active July 21, 2017 17:36
Gemstash SSL Configuration
:bind: 'ssl://0.0.0.0:8080?cert=$SSL_CERT_PATH&key=$SSL_KEY_PATH'
:protected_fetch: true
@michaeldever
michaeldever / gemstash.yml
Created July 21, 2017 17:38
HTTP Gemstash Configuration
:bind: tcp://0.0.0.0:8080
:protected_fetch: true
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
require "capistrano/rvm"
@michaeldever
michaeldever / ssh-add.sh
Created July 24, 2017 11:31
SSH Add Key
ssh-add ~/.ssh/id_rsa
@michaeldever
michaeldever / deploy.sh
Created July 24, 2017 11:51
Capistrano Deploy
cap production deploy
@michaeldever
michaeldever / setup_push_key.sh
Last active July 25, 2017 09:37
Setup Push Key
ssh gemstash@$GEMSERVER_IP
cd ~/current
bundle exec gemstash authorize push yank
:gemstash: $GEMSTASH_KEY