Skip to content

Commit

Permalink
add info for devopment
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandascovino committed Feb 5, 2024
1 parent 72a89da commit 5e43e89
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env-local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export CACHE_OPERACAO_CHUVA=redis://:@127.0.0.1:6379/0
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,44 @@ transporte municipal em dias de chuva.
- 🛜 Posição dos veículos em tempo real (*A desenvolver*)

![Interface da ferramenta](preview.jpeg)

## Desenvolvimento

1. Instale as seguintes ferramentas:

- [gcloud](https://cloud.google.com/sdk/docs/install?hl=pt-br#mac)
- [kubectl](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl?hl=pt-br)*

\* Utilize a seguinte configuração:

```sh
gcloud container clusters get-credentials rj-smtr --region=us-central1-c
```

2. Exponha o redis (banco contendo o cache dos dados) no seu local:

```sh
kubectl port-forward svc/redis -n operacao-chuva-staging 6379:6379
```

3. Num novo terminal, ative e configure o ambiente:

```sh
# Crie um ambiente local
python -m venv .venv
# Instancie o ambiente
. .venv/bin/activate
# Instale as dependências
pip install -r requirements.txt
# Instancie as variaveis de ambiente
source .env-local
```

5. Execute o aplicativo localmente:

```sh
streamlit run src/app.py
```

Pronto! O aplicativo estará disponível no seu navegador:
[http://localhost:8501/](http://localhost:8501/)

0 comments on commit 5e43e89

Please sign in to comment.