mirror of
https://github.com/danbulant/api_docs
synced 2026-06-20 14:51:22 +00:00
Basic support for Vagrant
This commit is contained in:
parent
787eb795b6
commit
57aa27c0eb
3 changed files with 57 additions and 14 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -14,9 +14,10 @@ tmp
|
||||||
*.DS_STORE
|
*.DS_STORE
|
||||||
build/
|
build/
|
||||||
.cache
|
.cache
|
||||||
|
.vagrant
|
||||||
|
|
||||||
# YARD artifacts
|
# YARD artifacts
|
||||||
.yardoc
|
.yardoc
|
||||||
_yardoc
|
_yardoc
|
||||||
doc/
|
doc/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
|
||||||
31
README.md
31
README.md
|
|
@ -43,23 +43,27 @@ You're going to need:
|
||||||
|
|
||||||
### Getting Set Up
|
### Getting Set Up
|
||||||
|
|
||||||
1. Fork this repository on Github.
|
1. Fork this repository on Github.
|
||||||
2. Clone *your forked repository* (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git`
|
2. Clone *your forked repository* (not our original one) to your hard drive with `git clone https://github.com/YOURUSERNAME/slate.git`
|
||||||
3. `cd slate`
|
3. `cd slate`
|
||||||
4. Install all dependencies: `bundle install`
|
4. Initialize and start
|
||||||
5. Start the test server: `bundle exec middleman server`
|
* Manually:
|
||||||
|
```shell
|
||||||
Or use the included Dockerfile! (must install Docker first)
|
bundle install
|
||||||
|
bundle exec middleman server
|
||||||
|
```
|
||||||
|
* Or via Docker (must install Docker first)
|
||||||
```shell
|
```shell
|
||||||
docker build -t slate .
|
docker build -t slate .
|
||||||
docker run -d -p 4567:4567 --name slate -v $(pwd)/source:/app/source slate
|
docker run -d -p 4567:4567 --name slate -v $(pwd)/source:/app/source slate
|
||||||
|
```
|
||||||
|
You can now see the docs at http://localhost:4567. Whoa! That was fast! Note: if you're using the Docker setup on OSX, the docs will be
|
||||||
|
availalable at the output of `boot2docker ip` instead of `localhost:4567`.
|
||||||
|
* Or via Vagrant
|
||||||
|
```shell
|
||||||
|
vagrant up
|
||||||
```
|
```
|
||||||
|
You can now see the docs at http://localhost:4567.
|
||||||
You can now see the docs at <http://localhost:4567>. Whoa! That was fast!
|
|
||||||
|
|
||||||
*Note: if you're using the Docker setup on OSX, the docs will be
|
|
||||||
availalable at the output of `boot2docker ip` instead of `localhost:4567`.*
|
|
||||||
|
|
||||||
Now that Slate is all set up your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/tripit/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/tripit/slate/wiki/Deploying-Slate).
|
Now that Slate is all set up your machine, you'll probably want to learn more about [editing Slate markdown](https://github.com/tripit/slate/wiki/Markdown-Syntax), or [how to publish your docs](https://github.com/tripit/slate/wiki/Deploying-Slate).
|
||||||
|
|
||||||
|
|
@ -97,6 +101,7 @@ Examples of Slate in the Wild
|
||||||
* [SocialRadar's LocationKit Docs](https://docs.locationkit.io/)
|
* [SocialRadar's LocationKit Docs](https://docs.locationkit.io/)
|
||||||
* [SafetyCulture API Documentation](https://developer.safetyculture.io/)
|
* [SafetyCulture API Documentation](https://developer.safetyculture.io/)
|
||||||
* [hosting.de API Documentation](https://www.hosting.de/docs/api/)
|
* [hosting.de API Documentation](https://www.hosting.de/docs/api/)
|
||||||
|
* [CheddarGetter API Documentation](http://docs.cheddargetter.com)
|
||||||
|
|
||||||
(Feel free to add your site to this list in a pull request!)
|
(Feel free to add your site to this list in a pull request!)
|
||||||
|
|
||||||
|
|
|
||||||
37
Vagrantfile
vendored
Normal file
37
Vagrantfile
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
Vagrant.configure(2) do |config|
|
||||||
|
config.vm.box = "ubuntu/trusty64"
|
||||||
|
config.vm.network :forwarded_port, guest: 4567, host: 4567
|
||||||
|
config.vm.provider "virtualbox" do |vb|
|
||||||
|
vb.memory = "384"
|
||||||
|
end
|
||||||
|
|
||||||
|
config.vm.provision "bootstrap",
|
||||||
|
type: "shell",
|
||||||
|
inline: <<-SHELL
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -yq ruby ruby-dev build-essential nodejs
|
||||||
|
sudo apt-get autoremove -yq
|
||||||
|
gem install --no-ri --no-rdoc bundler
|
||||||
|
SHELL
|
||||||
|
|
||||||
|
config.vm.provision "install",
|
||||||
|
type: "shell",
|
||||||
|
privileged: false,
|
||||||
|
inline: <<-SHELL
|
||||||
|
echo "=============================================="
|
||||||
|
echo "Installing app dependencies"
|
||||||
|
cd /vagrant
|
||||||
|
bundle install
|
||||||
|
SHELL
|
||||||
|
|
||||||
|
config.vm.provision "run",
|
||||||
|
type: "shell",
|
||||||
|
privileged: false,
|
||||||
|
inline: <<-SHELL
|
||||||
|
echo "=============================================="
|
||||||
|
echo "Starting up middleman at http://localhost:4567"
|
||||||
|
echo "If it does not come up, check the ~/middleman.log file for any error messages"
|
||||||
|
cd /vagrant
|
||||||
|
bundle exec middleman server --force-polling -l 1 &> ~/middleman.log &
|
||||||
|
SHELL
|
||||||
|
end
|
||||||
Loading…
Reference in a new issue