aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant')
-rw-r--r--vagrant/bootstrap.sh12
-rw-r--r--vagrant/rails.service12
2 files changed, 24 insertions, 0 deletions
diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh
new file mode 100644
index 0000000..14c42f3
--- /dev/null
+++ b/vagrant/bootstrap.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+pacman -Suyq --noconfirm
+pacman -Sq ruby gcc make sqlite3 nodejs --noconfirm
+echo "export GEM_HOME=`gem env gemdir`" > /etc/profile.d/rubygems.sh
+source /etc/profile.d/rubygems.sh
+gem install bundler --no-rdoc --no-ri --no-user-install
+cd /vagrant
+./script/setup
+cp vagrant/rails.service /usr/lib/systemd/system
+systemctl enable rails
+systemctl start rails
diff --git a/vagrant/rails.service b/vagrant/rails.service
new file mode 100644
index 0000000..c37116e
--- /dev/null
+++ b/vagrant/rails.service
@@ -0,0 +1,12 @@
+[Unit]
+Description="Systemd service to boot rails server when booting VM"
+
+[Install]
+WantedBy=multi-user.target
+After=remote-fs.target
+After=dhcpcd.service
+
+[Service]
+Type=simple
+ExecStart=/vagrant/script/rails server --port=80
+