# Back-end

## Paso a paso

### 1. Acceda al repositorio en GitHub a través del enlace

{% hint style="info" %}
<https://github.com/guiaedutec/geos-backend>
{% endhint %}

### 2. Clona el repositorio en tu servidor

```bash
$ git clone https://github.com/guiaedutec/geos-backend.git
```

### 3. Accede a la carpeta creada

```bash
$ cd geos-backend
```

### 4. Variables de entorno

En la raíz del proyecto, cambie el nombre del archivo **.env.example** a solo **.env**

### 5. Establecer variables de entorno según sea necesario

{% hint style="info" %}
**¡Atención!**

*Para que las funcionalidades funcionen correctamente, es obligatorio completar las variables de configuración del correo electrónico.*
{% endhint %}

{% code title=".env" %}

```bash
RAILS_ENV=development

# Credenciales de base de datos predeterminadas
# ¡Recomendamos cambiar el nombre de usuario y la contraseña en la base de datos por razones de seguridad!
MONGODB_HOST_1=host.docker.internal:30998
MONGODB_DATABASE=guia_edutec
MONGODB_USER=geos
MONGODB_PASS=<password-default>

# Ajustes del correo electrónico
MAIL_SERVER=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_DOMAIN=
MAIL_FROM=
MAIL_SENDER=

# URLs base
# Configure según sea necesario
FRONTEND_URL=host.docker.internal:8001
BACKEND_URL=host.docker.internal:8000

# Ingrese un hash aleatorio de 128 caracteres que contenga números y letras minúsculas
SECRET_KEY_BASE=
```

{% endcode %}

### 6. Ejecute el comando docker-compose

```bash
~/geos-backend$ docker-compose up -d
```

{% hint style="danger" %}
**¡Atención!**

*Si la aplicación se implementa en el sistema operativo Windows, verifique los caracteres de control del archivo **entrypoint.sh. Debe estar configurado en LF (Line Feed)**.*
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devops.guiaedutec.com.br/espanol-1/back-end.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
