diff default/node_modules/shoestring/Vagrantfile @ 0:1d038bc9b3d2 default tip

Up:default
author Liny <dev@neowd.com>
date Sat, 31 May 2025 09:21:51 +0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/default/node_modules/shoestring/Vagrantfile	Sat May 31 09:21:51 2025 +0800
@@ -0,0 +1,32 @@
+# -*- 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 = "precise64"
+  config.vm.box_url = "http://files.vagrantup.com/precise64.box"
+
+  config.vm.network "private_network", ip: "33.33.33.10"
+  config.vm.network "forwarded_port", guest: 80, host: 4567
+
+  config.vm.provision(:shell, :inline => <<-CMD)
+    # exit on error
+    set -e
+
+    echo "Installing node and deps ..."
+    if ! which node; then
+      apt-get update
+      apt-get install -y build-essential fontconfig
+      apt-get install -y python-software-properties
+      add-apt-repository ppa:chris-lea/node.js
+      apt-get update
+      apt-get install -y nodejs
+    fi
+    apt-get install -y vim
+
+  CMD
+
+  config.vm.provision(:shell, :inline => "cd /vagrant && npm install && npm test")
+end