caarleexx commited on
Commit
91cd2dd
·
verified ·
1 Parent(s): 406394d

Create start.sh

Browse files
Files changed (1) hide show
  1. start.sh +14 -0
start.sh ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Inicia o backend FastAPI em segundo plano
4
+ # --host 0.0.0.0 é essencial para que ele seja acessível dentro do contêiner
5
+ echo "Iniciando o backend FastAPI..."
6
+ uvicorn backend.main:app --host 0.0.0.0 --port 8000 &
7
+
8
+ # Aguarda alguns segundos para garantir que o backend tenha tempo de iniciar
9
+ sleep 5
10
+
11
+ # Inicia o frontend Chainlit em primeiro plano
12
+ # O Space do Hugging Face irá expor a porta 7860 para a web
13
+ echo "Iniciando o frontend Chainlit..."
14
+ chainlit run frontend/app.py --host 0.0.0.0 --port 7860 -w