-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
43 lines (37 loc) · 1.38 KB
/
Copy pathstart.sh
File metadata and controls
43 lines (37 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
echo "======================================"
echo " Encerrando ambiente anterior (se existir)"
echo "======================================"
docker compose down
echo ""
echo "======================================"
echo " Iniciando ambiente com Docker Compose"
echo "======================================"
docker compose up --build -d
echo ""
echo "Aguardando inicialização dos serviços..."
sleep 20
echo ""
echo "======================================"
echo " URL do serviço n8n"
echo "======================================"
echo "n8n: http://localhost:5678"
sleep 3
echo ""
echo "Abrindo n8n no navegador..."
# Detecta o sistema operacional / comando disponível para abrir URL
if command -v xdg-open >/dev/null 2>&1; then
xdg-open http://localhost:5678 >/dev/null 2>&1 &
elif command -v open >/dev/null 2>&1; then
open http://localhost:5678 >/dev/null 2>&1 &
elif command -v powershell.exe >/dev/null 2>&1; then
powershell.exe -NoProfile -Command "Start-Process 'http://localhost:5678'" >/dev/null 2>&1 &
elif command -v cmd.exe >/dev/null 2>&1; then
cmd.exe /C start "" "http://localhost:5678" >/dev/null 2>&1 &
else
echo "Não foi possível detectar o comando para abrir o navegador. Abra manualmente: http://localhost:5678"
fi
echo ""
echo "Ambiente iniciado com sucesso!"
read -p "Pressione qualquer tecla para fechar esta janela..." -n 1 -r
echo ""