Add general Vagrant documentation
This commit is contained in:
44
docs/en/installation/vagrant.md
Normal file
44
docs/en/installation/vagrant.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Vagrant
|
||||||
|
|
||||||
|
Install [Vagrant](https://www.vagrantup.com/) and setup a virtual machine with [Linux](prerequisites.md)
|
||||||
|
|
||||||
|
Vagrant is compatible for [Debian](/en/installation/debian.md) and [Ubuntu](/en/installation/ubuntu.md).
|
||||||
|
|
||||||
|
## Browser configuration
|
||||||
|
|
||||||
|
To access the application through the brower at `localhost:3000` we must forward a port and run the rails server with a binding option:
|
||||||
|
|
||||||
|
## Port forwarding
|
||||||
|
Open the Vagrant configuration file:
|
||||||
|
|
||||||
|
```
|
||||||
|
nano Vagranfile
|
||||||
|
```
|
||||||
|
|
||||||
|
Find this line:
|
||||||
|
|
||||||
|
```
|
||||||
|
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
||||||
|
```
|
||||||
|
|
||||||
|
And change it for this configuration:
|
||||||
|
|
||||||
|
```
|
||||||
|
config.vm.network "forwarded_port", guest: 3000, host: 3000
|
||||||
|
```
|
||||||
|
|
||||||
|
Reload your virtual machine:
|
||||||
|
|
||||||
|
```
|
||||||
|
vagrant reload
|
||||||
|
```
|
||||||
|
|
||||||
|
# Running the rails server
|
||||||
|
|
||||||
|
In your virtual machine, run the application server, binding to your local ip address:
|
||||||
|
|
||||||
|
```
|
||||||
|
bin/rails s -b 0.0.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you should be able to see the application running in your browser at url `localhost:3000`! :tada:
|
||||||
44
docs/es/installation/vagrant.md
Normal file
44
docs/es/installation/vagrant.md
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Vagrant
|
||||||
|
|
||||||
|
Instale [Vagrant](https://www.vagrantup.com/) y configure una máquina virtual con [Linux](prerequisites.md)
|
||||||
|
|
||||||
|
Vagrant es compatible para [Debian](/es/installation/debian.md) y [Ubuntu](/es/installation/ubuntu.md).
|
||||||
|
|
||||||
|
## Browser configuration
|
||||||
|
|
||||||
|
Para acceder a la aplicación a través del navegador en la url `localhost:3000` debe enrutar el puerto de la aplicación y ejectuar el servidor de la aplicación con la opción `-b`:
|
||||||
|
|
||||||
|
## Enrutar el puerto de la aplicación
|
||||||
|
Abra el archivo de configuración de Vagrant:
|
||||||
|
|
||||||
|
```
|
||||||
|
nano Vagranfile
|
||||||
|
```
|
||||||
|
|
||||||
|
Encuentre esta línea:
|
||||||
|
|
||||||
|
```
|
||||||
|
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
||||||
|
```
|
||||||
|
|
||||||
|
Cámbiela por esta:
|
||||||
|
|
||||||
|
```
|
||||||
|
config.vm.network "forwarded_port", guest: 3000, host: 3000
|
||||||
|
```
|
||||||
|
|
||||||
|
Recargue la máquina virtual:
|
||||||
|
|
||||||
|
```
|
||||||
|
vagrant reload
|
||||||
|
```
|
||||||
|
|
||||||
|
# Ejecutar el servidor
|
||||||
|
|
||||||
|
En su máquina virtual, debe ejecutar la aplicación enlanzándola a su IP local:
|
||||||
|
|
||||||
|
```
|
||||||
|
bin/rails s -b 0.0.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Ahora debería ver la aplicación desde el navegardor en la url `localhost:3000` :tada:
|
||||||
Reference in New Issue
Block a user