From 840b01d1dcc35339786eb4a6a00502c10801ab9a Mon Sep 17 00:00:00 2001 From: gotlium Date: Thu, 9 Jul 2015 04:32:04 +0300 Subject: [PATCH] add vagrant-cachier support --- Vagrantfile | 9 +++++++++ demo/.vagrant_bootstrap.sh | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index bcdd6cf..d6b9a04 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -41,6 +41,15 @@ Vagrant.configure("2") do |config| vb.customize ["modifyvm", :id, "--cpus", APP_CPUS] end + if Vagrant.has_plugin?("vagrant-cachier") + config.cache.scope = :box + config.vm.network :private_network, ip: "44.44.44.45" + + config.cache.synced_folder_opts = { + type: :nfs, + mount_options: ['rw', 'vers=3', 'tcp', 'nolock'] + } + end end # # }}} diff --git a/demo/.vagrant_bootstrap.sh b/demo/.vagrant_bootstrap.sh index a3d7a77..fd27ec2 100644 --- a/demo/.vagrant_bootstrap.sh +++ b/demo/.vagrant_bootstrap.sh @@ -2,13 +2,14 @@ apt-get update apt-get install -y redis-server git \ - python python-dev python-pip libxml2-dev libxslt-dev zlib1g-dev && \ - apt-get clean + python python-dev python-pip libxml2-dev libxslt-dev zlib1g-dev pip install -r /mailer/requirements.txt +if [ -f "demo/db.sqlite" ]; then rm ./demo/db.sqlite; fi + python /mailer/manage.py syncdb --noinput python /mailer/manage.py migrate --noinput python /mailer/manage.py loaddata /mailer/auth.json -/bin/bash -c 'C_FORCE_ROOT=1 python /mailer/manage.py celeryd -Q default >& /dev/null & python /mailer/manage.py runserver 0.0.0.0:8000 >& /dev/null &' +nohup /bin/bash -c 'C_FORCE_ROOT=1 python /mailer/manage.py celeryd -Q default >& /dev/null & python /mailer/manage.py runserver 0.0.0.0:8000 >& /dev/null &' &