Create start.sh
Browse files
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
|