diff --git a/.gitignore b/.gitignore index 38a592e9b..3675d98dc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ plugins/New Text Document.txt plugins/srvv.py run.cmd config +.vagrant diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000..9aab9025c --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,6 @@ +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = "ubuntu/trusty32" + config.vm.provision :shell, path: "vagrant-bootstrap.sh" +end diff --git a/vagrant-bootstrap.sh b/vagrant-bootstrap.sh new file mode 100644 index 000000000..9baedd057 --- /dev/null +++ b/vagrant-bootstrap.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# update sources +sudo apt-get update + +# install things: +# pip so we can install rependencies +# git so pip can clone from repository +# libenchant-dev so python-enchant can use it +# python3-lxml so we can use precompiled binaries instead of compiling them + +sudo apt-get install -y python3-pip git libenchant-dev python3-lxml + +# install requirements using pip +sudo pip3 install -r /vagrant/requirements.txt + +# create link from project to ~/bot +ln -sf /vagrant /home/vagrant/bot + +# create start.sh script +cat > /home/vagrant/start.sh << EOF +#!/usr/bin/env bash +cd /home/vagrant/bot +python3 -m cloudbot +EOF