mirror of
https://github.com/danbulant/api_docs
synced 2026-05-27 05:42:42 +00:00
A Vagrantfile based on debian/jessie64 (#708)
* Add VagrantFile compatible from debian/jessie64 box and latest ruby stable version (2.4.0) * Fix indent in vagrantfile for jessie64 * Remove Vagrantfile for Jessie * Replace Vagrantfile with debian/jessie and last ruby version
This commit is contained in:
parent
61d7f08ff2
commit
7b1e718672
1 changed files with 19 additions and 12 deletions
31
Vagrantfile
vendored
31
Vagrantfile
vendored
|
|
@ -1,21 +1,28 @@
|
||||||
Vagrant.configure(2) do |config|
|
Vagrant.configure(2) do |config|
|
||||||
config.vm.box = "ubuntu/trusty64"
|
config.vm.box = "debian/jessie64"
|
||||||
config.vm.network :forwarded_port, guest: 4567, host: 4567
|
config.vm.network :forwarded_port, guest: 4567, host: 4567
|
||||||
|
config.vm.synced_folder ".", "/vagrant", type: "rsync"
|
||||||
|
|
||||||
config.vm.provision "bootstrap",
|
# Download and install ruby from sources and other tools
|
||||||
type: "shell",
|
config.vm.provision "shell",
|
||||||
inline: <<-SHELL
|
inline: <<-SHELL
|
||||||
sudo apt-get update
|
apt-get -yq install zlib1g-dev libssl-dev libreadline-dev libgdbm-dev openssl git libxml2-dev libxslt-dev build-essential nodejs
|
||||||
sudo apt-get install -yq ruby2.0 ruby2.0-dev pkg-config build-essential nodejs git libxml2-dev libxslt-dev
|
wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.gz
|
||||||
sudo apt-get autoremove -yq
|
tar xvfz ruby-2.4.0.tar.gz
|
||||||
gem2.0 install --no-ri --no-rdoc bundler
|
cd ruby-2.4.0
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
gem install --no-ri --no-rdoc bundler
|
||||||
|
rm -rf ruby-2.4.0.tar.gz ruby-2.4.0
|
||||||
|
apt-get autoremove -yq
|
||||||
SHELL
|
SHELL
|
||||||
|
|
||||||
# add the local user git config to the vm
|
# add the local user git config to the vm
|
||||||
config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"
|
config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"
|
||||||
|
|
||||||
config.vm.provision "install",
|
# Install project dependencies (gems)
|
||||||
type: "shell",
|
config.vm.provision "shell",
|
||||||
privileged: false,
|
privileged: false,
|
||||||
inline: <<-SHELL
|
inline: <<-SHELL
|
||||||
echo "=============================================="
|
echo "=============================================="
|
||||||
|
|
@ -25,8 +32,8 @@ Vagrant.configure(2) do |config|
|
||||||
bundle install
|
bundle install
|
||||||
SHELL
|
SHELL
|
||||||
|
|
||||||
config.vm.provision "run",
|
# Exec server
|
||||||
type: "shell",
|
config.vm.provision "shell",
|
||||||
privileged: false,
|
privileged: false,
|
||||||
run: "always",
|
run: "always",
|
||||||
inline: <<-SHELL
|
inline: <<-SHELL
|
||||||
|
|
@ -34,6 +41,6 @@ Vagrant.configure(2) do |config|
|
||||||
echo "Starting up middleman at http://localhost:4567"
|
echo "Starting up middleman at http://localhost:4567"
|
||||||
echo "If it does not come up, check the ~/middleman.log file for any error messages"
|
echo "If it does not come up, check the ~/middleman.log file for any error messages"
|
||||||
cd /vagrant
|
cd /vagrant
|
||||||
bundle exec middleman server --force-polling --latency=1 &> ~/middleman.log &
|
bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log &
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue