> For the complete documentation index, see [llms.txt](https://docs.devops.guiaedutec.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devops.guiaedutec.com.br/back-end.md).

# Back-end

## Step-by-step

### 1. Access the repository on GitHub via the link

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

### 2. Clone the repository to your server

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

### 3. Access the created folder

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

### 4. Environment variables

At the root of the project, rename the **.env.example** file to just **.env**

### 5. Set environment variables as needed

{% hint style="info" %}
**Attention!**

*For the functionalities to work correctly, it is mandatory to fill in the email configuration variables.*
{% endhint %}

{% code title=".env" %}

```bash
RAILS_ENV=development

# Default Database Credentials
# We recommend changing the username and password in the database for security reasons!
MONGODB_HOST_1=host.docker.internal:30998
MONGODB_DATABASE=guia_edutec
MONGODB_USER=geos
MONGODB_PASS=<password-default>

# Email settings
MAIL_SERVER=
MAIL_PORT=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_DOMAIN=
MAIL_FROM=
MAIL_SENDER=

# URLs base
# Configure as needed
FRONTEND_URL=host.docker.internal:8001
BACKEND_URL=host.docker.internal:8000

# Enter a 128-character random hash containing numbers and lowercase letters
SECRET_KEY_BASE=
```

{% endcode %}

### 6. Run docker-compose command

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

{% hint style="danger" %}
**Attention!**

*If the application is deployed on the Windows operating system, check the control characters in the **entrypoint.sh file. It must be configured as LF (Line Feed)**.*
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
