bundle install
bundle exec vagrant up
./install.sh
open http://node-js-sample.deploy.192.168.33.10.xip.io
Last active
August 29, 2015 14:00
-
-
Save kazu69/babc9cb28b56e6cd2c96 to your computer and use it in GitHub Desktop.
dokku
This file contains 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 'vagrant', git: "https://github.com/mitchellh/vagrant.git" | |
group :plugins do | |
gem 'sahara' | |
gem 'vagrant-omnibus' | |
gem 'vagrant-librarian-chef' | |
gem 'vagrant-hostsupdater' | |
end |
This file contains 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 | |
# 公開鍵を登録 | |
# sshcommandでvagrantの公開鍵をdokkuユーザーに追加し、~dokku/.ssh/authorized_keysを作成 | |
cat ~/.ssh/id_rsa.pub | ssh vagrant@192.168.33.10 "sudo sshcommand acl-add dokku vagrant" | |
git clone https://github.com/heroku/node-js-sample.git | |
cd node-js-sample && git remote add my-heroku dokku@deploy.192.168.33.10.xip.io:node-js-sample | |
# pushして実行環境構築とアプリケーション実行 | |
git push my-heroku master | |
open http://node-js-sample.deploy.192.168.33.10.xip.io/ |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "Ubuntu12_04" | |
config.vm.box_url = "http://download.appscale.com/download/AppScale%201.12.0%20VirtualBox%20Image" | |
config.vm.network :private_network, ip: "192.168.33.10" | |
config.vm.network "forwarded_port", guest: 5000, host: 80 | |
config.vm.provision :shell, :inline => <<-EOT | |
sudo apt-get -y update | |
sudo apt-get install -y python-software-properties | |
# dokkuインストール | |
wget -qO- https://raw.github.com/progrium/dokku/v0.2.2/bootstrap.sh | sudo DOKKU_TAG=v0.2.3 bash | |
# Ubuntuにアクセスするドメインを設定 | |
echo deploy.192.168.33.10.xip.io | sudo tee /home/dokku/VHOST | |
EOT | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment