Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for Vagrant Share #466

Merged
merged 5 commits into from Nov 14, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/guides.rst
Expand Up @@ -83,3 +83,37 @@ In normal circumstances editing Chassis' own ``wp-config.php`` file is discourag
This will prevent WP-CLI from loading ``wp-settings.php`` twice.

With this configuration you should now be ready to develop against WordPress Core.

Vagrant Share
-------------

Vagrant Share enables the ability to generate a temporary URL which you can share with people to allow them access to your local Chassis installation.

1. **Install ngrok**

Vagrant Share requires `ngrok` to be installed on the host machine.
You can verify if this is installed by running `which ngrok` in a terminal. If there is no output then you will need to download and install `ngrok`_.
Once you've downloaded `ngrok` unzip it: `unzip /path/to/ngrok-stable-darwin-amd64.zip`
Move ngrok: `mv /path/to/ngrok /usr/local/bin/ngrok`

2. **Run Vagrant Share**

You now need to run `vagrant share --http=vagrant.local:80`. If you're using a custom domain then you will need to use that e.g. `vagrant share --http=<your-custom-domain>.local:80`.
You will then have a temporary URL generated for you. e.g. `http://bea1a5c2.ngrok.io`. You need to leave this running in the background.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use a placeholder name here (e.g. http://<id>.ngrok.io) instead to make it clearer.


3. **Alter your Chassis config**

Alter one of your Chassis config files to include the additional URL without the `http://`. e.g.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably just be include the additional domain

.. code-block:: yaml

hosts:
- vagrant.local
- bea1a5c2.ngrok.io

4. **Reprovision Vagrant**

You now need to run `vagrant provision` and you should be able to access your Chassis box with the URL generated in Step 2.
If you see an error when you run `vagrant provision` then try running it again.
If you're still having trouble accessing the URL try a `vagrant reload` after you've run a successful `vagrant provision`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move these lines to a debugging subsection below?


.. _ngrok: https://ngrok.com/download