dashboard/run_app.sh
Mart van Santen 660a2b5a8c - Add check for kratos port
- Add new version of port forward script
2021-12-08 07:56:58 +01:00

26 lines
992 B
Bash
Executable file

GREEN='\033[0;32m'
RED='\033[1;31m'
NC='\033[0m' # No Color
# Check if kratos port is open
if nc -z localhost 8000;
then
echo -e "${GREEN}Great! It looks like the Kratos Admin port is available${NC}"
else
echo -e "${RED}**********************************************************${NC}"
echo -e "${RED}WARNING! It looks like the Kratos Admin port NOT available${NC}"
echo -e "${RED}please run in a seperate terminal: ${NC}"
echo -e "${RED}./set-ssh-tunnel.sh init.stackspin.net ${NC}"
echo -e "${RED} ${NC}"
echo -e "${RED}We will continue to start the app after 5 seconds. ${NC}"
echo -e "${RED}**********************************************************${NC}"
sleep 5
fi
export FLASK_APP=app.py
export FLASK_ENV=development
export SECRET_KEY="e38hq!@0n64g@qe6)5csk41t=ljo2vllog(%k7njnm4b@kh42c"
export KRATOS_URL="http://127.0.0.1:8000"
flask run