Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Feat/readme M1 config #84

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion README-PTBR.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,39 @@ Em seguida rode no terminal do repositório o comando a seguir:
godoc -http=:6060
````

O GoDoc será executado em `localhost:6060`. Para acessar a documentação do GoDoc, basta [clicar aqui](http://localhost:6060/pkg/).
O GoDoc será executado em `localhost:6060`. Para acessar a documentação do GoDoc, basta [clicar aqui](http://localhost:6060/pkg/).

## MacOS config

O MySQL usado no arquivo Docker compose não é compatível aos chips da Apple (M1 e M2). Para que funcione faça as seguintes alterações:

### Arquivo .env

Crie a variável `FEATWS_API_MYSQL_URI` e adicione o caminho como a seguir:

``````
FEATWS_API_MYSQL_URI=api:api@tcp(localhost:3307)/api
``````

### Docker Compose

No docker compose será necessário que seja alterado o MySQL para o MariaDB. Apenas é necessário alterar o **db** do docker-compose.

``````
db:
image: mariadb
restart: always
ports:
- 3307:3306
volumes:
- ./data/mysql:/var/lib/mysql:rw
user: mysql
environment:
MARIADB_ROOT_PASSWORD: "root"
MARIADB_DATABASE: "api"
MARIADB_USER: "api"
MARIADB_PASSWORD: "api"
TELEMETRY_HTTPCLIENT_TLS: "false"
TELEMETRY_EXPORTER_JAEGER_AGENT_HOST: "localhost"
TELEMETRY_ENVIRONMENT: local
``````
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,39 @@ Then run the following command in the repository terminal:
godoc -http=:6060
````

GoDoc will run on `localhost:6060`. To access the GoDoc documentation, just [click here](http://localhost:6060/pkg/).
GoDoc will run on `localhost:6060`. To access the GoDoc documentation, just [click here](http://localhost:6060/pkg/).

## MacOS config

The MySQL used in the Docker Compose file isn't compatible with Apple's M1 and M2 chips. To make it work, perform the following modifications:

### Arquivo .env

Create the variable FEATWS_API_MYSQL_URI and set the path as follows:

``````
FEATWS_API_MYSQL_URI=api:api@tcp(localhost:3307)/api
``````

### Docker Compose

In the Docker Compose file, it is necessary to change MySQL to MariaDB. Only the "db" section in the docker-compose file needs to be modified.

``````
db:
image: mariadb
restart: always
ports:
- 3307:3306
volumes:
- ./data/mysql:/var/lib/mysql:rw
user: mysql
environment:
MARIADB_ROOT_PASSWORD: "root"
MARIADB_DATABASE: "api"
MARIADB_USER: "api"
MARIADB_PASSWORD: "api"
TELEMETRY_HTTPCLIENT_TLS: "false"
TELEMETRY_EXPORTER_JAEGER_AGENT_HOST: "localhost"
TELEMETRY_ENVIRONMENT: local
``````
Loading