From c2404760b8c0bf690ee6233131a59bfd047b41bb Mon Sep 17 00:00:00 2001 From: scragg Date: Thu, 6 Nov 2014 16:28:19 -0600 Subject: [PATCH] update vagrantfile and install script --- Vagrantfile | 6 +++--- install.sh | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index f4b36da..56acd78 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,11 +5,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provider :virtualbox do |vb| vb.name = "realms-wiki" - vb.memory = 2048 - vb.cpus = 4 + vb.memory = 512 + vb.cpus = 2 end - config.vm.provision "shell", path: "install.sh" + config.vm.provision "shell", path: "install.sh", privileged: "false" end Vagrant::Config.run do |config| diff --git a/install.sh b/install.sh index 275b651..5197390 100755 --- a/install.sh +++ b/install.sh @@ -43,21 +43,25 @@ libffi-dev libyaml-dev libssl-dev nodejs # Install frontend assets sudo npm install -g bower -cd ${APP_DIR} +cd /home/vagrant + -bower --config.interactive=false install virtualenv .venv source .venv/bin/activate +cd /vagrant +bower --config.interactive=false install pip install -r requirements.txt echo "Installing start scripts" -cat << EOF > /usr/local/bin/realms-wiki +cat << EOF > /tmp/realms-wiki #!/bin/bash -${APP_DIR}/.venv/bin/realms-wiki "\$@" +/home/vagrant/.venv/bin/realms-wiki "\$@" EOF +sudo mv /tmp/realms-wiki /usr/local/bin + sudo chmod +x /usr/local/bin/realms-wiki realms-wiki start \ No newline at end of file