]> git.openstreetmap.org Git - rails.git/blob - VAGRANT.md
Quote translations to stop them looking like numbers
[rails.git] / VAGRANT.md
1 # Installing Vagrant
2
3 On Ubuntu, it should be as simple as:
4
5 ```
6 sudo apt-get install vagrant
7 ```
8
9 Other Linux distributions should have similar installation instructions using `dnf`, `pacman`, or similar.
10
11 Installers are available for Mac OS X and Windows, please see the [Vagrant project download page](https://www.vagrantup.com/downloads.html) for more information.
12
13 Note than until there are suitable _xenial64_ [vagrant boxes](https://atlas.hashicorp.com/boxes/search?utf8=%E2%9C%93&sort=&provider=&q=xenial64) for other providers,
14 the only virtualization provider supported is virtualbox. You might need to install it and specify `--provider virtualbox` when setting up your environment.
15
16 # Setting up openstreetmap-website
17
18 Once Vagrant has been installed, you can start an environment by checking out the openstreetmap-website code if you haven't already, then changing to the directory which contains the Vagrantfile by typing:
19
20 ```
21 git clone git@github.com:openstreetmap/openstreetmap-website.git
22 cd openstreetmap-website
23 vagrant up
24 ```
25
26 This will take a few minutes to download required software from the internet and set it up as a running system. Once it is complete, you should be able to log into the running VM by typing:
27
28 ```
29 vagrant ssh
30 ```
31
32 Within this login shell, you can do development, run the server or the tests. For example, to run the tests:
33
34 ```
35 cd /srv/openstreetmap-website/
36 rake test
37 ```
38
39 To access the web pages you run the following commands then access the site in your [local browser](http://localhost:3000):
40
41 ```
42 vagrant ssh
43 cd /srv/openstreetmap-website/
44 rails server --binding=0.0.0.0
45 ```
46
47 You edit the code on your computer using the code editor you are used to using, then through shared folders the code is updated on the VM instantly.
48
49 You should run the tests before submitting any patch or Pull Request back to the original repository. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information.