emanoelopes commited on
Commit
160bec9
·
1 Parent(s): f7c57b6

Add Docker support with docker-compose configuration and environment example

Browse files

- Introduced a `docker-compose.yml` file for easy deployment of the application with services for both production and development.
- Added an `env.example` file to provide environment variable configurations for Streamlit.
- Updated `README.md` and `SETUP.md` to include instructions for running the application using Docker and Docker Compose.

Files changed (6) hide show
  1. README.md +17 -0
  2. SETUP.md +26 -1
  3. data/.~lock.planilha_exemplo_500.xlsx# +0 -1
  4. docker-compose.yml +47 -0
  5. env.example +9 -0
  6. uci.pkl +2 -2
README.md CHANGED
@@ -4,3 +4,20 @@ Sistema de identificação de dificuldades de aprendzagem por meio de IA.
4
 
5
  Produto educacional digital para compor os requisistos exigidos pelo Mestrado Profissional em Tecnologia Educacional.
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  Produto educacional digital para compor os requisistos exigidos pelo Mestrado Profissional em Tecnologia Educacional.
6
 
7
+ ## 🐳 Execução com Docker (Recomendado)
8
+
9
+ O projeto está totalmente configurado para execução em qualquer dispositivo usando Docker:
10
+
11
+ ```bash
12
+ # Execução simples
13
+ docker-compose up -d
14
+
15
+ # Acesse: http://localhost:8501
16
+ ```
17
+
18
+ ### Comandos Docker Compose:
19
+ - `docker-compose up -d` - Executar em background
20
+ - `docker-compose down` - Parar serviços
21
+ - `docker-compose logs -f` - Ver logs em tempo real
22
+ - `docker-compose --profile dev up -d` - Modo desenvolvimento
23
+
SETUP.md CHANGED
@@ -29,6 +29,31 @@ streamlit run webapp/home_1.py
29
  - `docs/` - Documentação técnica
30
 
31
  ## Comandos Úteis
 
 
32
  - Executar: `streamlit run webapp/home_1.py`
33
  - Testes: `pytest`
34
- - Docker: `docker build -t sida . && docker run -p 8501:8501 sida`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  - `docs/` - Documentação técnica
30
 
31
  ## Comandos Úteis
32
+
33
+ ### Execução Local
34
  - Executar: `streamlit run webapp/home_1.py`
35
  - Testes: `pytest`
36
+
37
+ ### Docker (Recomendado)
38
+ ```bash
39
+ # Usando Docker Compose (mais fácil)
40
+ docker-compose up -d
41
+
42
+ # Ou usando Docker diretamente
43
+ docker build -t sida . && docker run -p 8501:8501 sida
44
+ ```
45
+
46
+ ### Docker Compose - Opções Avançadas
47
+ ```bash
48
+ # Executar em modo desenvolvimento (com hot-reload)
49
+ docker-compose --profile dev up -d
50
+
51
+ # Parar todos os serviços
52
+ docker-compose down
53
+
54
+ # Reconstruir e executar
55
+ docker-compose up --build -d
56
+
57
+ # Ver logs
58
+ docker-compose logs -f sida
59
+ ```
data/.~lock.planilha_exemplo_500.xlsx# DELETED
@@ -1 +0,0 @@
1
- ,emanoel,emanoel,24.10.2025 09:22,file:///home/emanoel/.config/libreoffice/4;
 
 
docker-compose.yml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+
3
+ services:
4
+ sida:
5
+ build: .
6
+ container_name: sida-app
7
+ ports:
8
+ - "8501:8501"
9
+ volumes:
10
+ # Persistir dados processados
11
+ - ./data:/app/data
12
+ # Persistir datasets (opcional)
13
+ - ./datasets:/app/datasets
14
+ # Persistir arquivos de configuração
15
+ - ./gw_config.json:/app/gw_config.json
16
+ environment:
17
+ # Configurações do Streamlit
18
+ - STREAMLIT_SERVER_PORT=8501
19
+ - STREAMLIT_SERVER_ADDRESS=0.0.0.0
20
+ - STREAMLIT_SERVER_HEADLESS=true
21
+ - STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
22
+ restart: unless-stopped
23
+ healthcheck:
24
+ test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
25
+ interval: 30s
26
+ timeout: 10s
27
+ retries: 3
28
+ start_period: 40s
29
+
30
+ # Serviço opcional para desenvolvimento com hot-reload
31
+ sida-dev:
32
+ build: .
33
+ container_name: sida-dev
34
+ ports:
35
+ - "8502:8501"
36
+ volumes:
37
+ - .:/app
38
+ - ./data:/app/data
39
+ - ./datasets:/app/datasets
40
+ environment:
41
+ - STREAMLIT_SERVER_PORT=8501
42
+ - STREAMLIT_SERVER_ADDRESS=0.0.0.0
43
+ - STREAMLIT_SERVER_HEADLESS=true
44
+ - STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
45
+ command: ["streamlit", "run", "webapp/home_1.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.runOnSave=true"]
46
+ profiles:
47
+ - dev
env.example ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # Configurações do Streamlit
2
+ STREAMLIT_SERVER_PORT=8501
3
+ STREAMLIT_SERVER_ADDRESS=0.0.0.0
4
+ STREAMLIT_SERVER_HEADLESS=true
5
+ STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
6
+
7
+ # Configurações opcionais para desenvolvimento
8
+ # STREAMLIT_SERVER_RUN_ON_SAVE=true
9
+ # STREAMLIT_SERVER_FILE_WATCHER_TYPE=poll
uci.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d3db46da97fc1e891182b22caeba81d64b48cc5ea7922f2f624c9973c5f352de
3
- size 3176212
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:523495c50b3f0fba6b2cf24f9f29147c61b176b50857f12b7eeb7f035300485a
3
+ size 3176213