diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2014-01-11 16:20:21 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2014-01-11 16:20:21 +0100 |
commit | 3b29ca76240e26d31d5fdef50c699d185f3daa82 (patch) | |
tree | 8b0119ff331d68910b6502b4373553591329f430 /vagrant/rails.service | |
parent | a6302289c005e96520969a8abff3d5b262dfffb9 (diff) | |
download | hmnoweb-3b29ca76240e26d31d5fdef50c699d185f3daa82.tar.gz hmnoweb-3b29ca76240e26d31d5fdef50c699d185f3daa82.tar.bz2 hmnoweb-3b29ca76240e26d31d5fdef50c699d185f3daa82.zip |
Add vagrant setup to make deploying dev env easier.
Run 'vagrant up' to bootstrap the environment. The first time you
do this, takes quite some time as it will download the base image,
and provision it for the dev environment.
Onse up you should be able to log in the the dev website by
pointing your web browser to localhost:4567. The first time you
will have to register a new user, and off you go.
Run 'vagrant halt' to stop the vm. Next time you restart it using
'vagrant up' it should boot a lot faster, since the provisioning is
already done.
Run 'vagrant destroy' to clean up the VM and reclaim any disk space
used by it. This will not remove the base image, only the instance
in this dev environment.
Notice: Due to a problem, the dev web server fails to start when
doing a 'vagrant up' after the initial provisioning. To overcome
this issue the following commands and you should be fine again:
vagrant ssh
sudo systemctl start rails
logout
Now wait a few seconds and the web server should respond again.
I'll try to fix this problem later.
requires vagrant and VirtualBox to work.
See http://www.vagrantup.com for instructions on how to install
vagrant for your system.
Diffstat (limited to 'vagrant/rails.service')
-rw-r--r-- | vagrant/rails.service | 12 |
1 files changed, 12 insertions, 0 deletions
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 + |