Vagrantfile: Add support for a custom post-provision script.

Documentation tweaked by tabbott.

Fixes #3108.
This commit is contained in:
hackerkid 2017-01-30 21:28:54 +05:30 committed by Tim Abbott
parent cf4faf6598
commit 8b2d4f150a
3 changed files with 13 additions and 0 deletions

1
.gitignore vendored
View File

@ -27,3 +27,4 @@ npm-debug.log
var/*
.vscode/
tools/conf.ini
tools/custom_provision

4
Vagrantfile vendored
View File

@ -101,6 +101,10 @@ if [ -d "/sys/fs/selinux" ]; then
fi
ln -nsf /srv/zulip ~/zulip
/srv/zulip/tools/provision
if [ -f /srv/zulip/tools/custom_provision ]; then
chmod +x /srv/zulip/tools/custom_provision
/srv/zulip/tools/custom_provision
fi
SCRIPT
config.vm.provision "shell",

View File

@ -462,6 +462,14 @@ much faster than the original `vagrant up` since the base image is
already cached on your machine (it takes about 5 minutes to run with a
fast Internet connection).
Any additional programs (e.g. Zsh, emacs, etc.) or configuration that
you may have installed in the development environment will be lost
when you recreate it. To address this, you can create a script called
`tools/custom_provision` in your Zulip Git checkout; and place any
extra setup commands there. Vagrant will run `tools/custom_provision`
every time you run `vagrant provision` (or create a Vagrant guest via
`vagrant up`).
#### Shutting down the development environment for use later
To shut down but preserve the development environment so you can use