fix: fix setup_remote script and docker compose

This commit is contained in:
Abhishek Kumar 2026-02-03 13:52:30 +05:30
parent 8ba69b35df
commit 6d111e76c7
2 changed files with 23 additions and 23 deletions

View file

@ -30,20 +30,20 @@ if ! [[ "$SERVER_IP" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
exit 1
fi
# Get the TURN password
echo -e "${YELLOW}Enter a password for the TURN server (press Enter for default 'dograh-turn-secret'):${NC}"
read -sp "> " TURN_PASSWORD
# Get the TURN secret
echo -e "${YELLOW}Enter a shared secret for the TURN server (press Enter to generate a random one):${NC}"
read -sp "> " TURN_SECRET
echo ""
if [[ -z "$TURN_PASSWORD" ]]; then
TURN_PASSWORD="dograh-turn-secret"
echo -e "${BLUE}Using default TURN password${NC}"
if [[ -z "$TURN_SECRET" ]]; then
TURN_SECRET=$(openssl rand -hex 32)
echo -e "${BLUE}Generated random TURN secret${NC}"
fi
echo ""
echo -e "${GREEN}Configuration:${NC}"
echo -e " Server IP: ${BLUE}$SERVER_IP${NC}"
echo -e " TURN Password: ${BLUE}********${NC}"
echo -e " TURN Secret: ${BLUE}********${NC}"
echo ""
# Create project directory if it doesn't exist
@ -135,10 +135,9 @@ echo -e "${GREEN}✓ SSL certificates generated${NC}"
echo -e "${BLUE}[5/5] Creating environment file...${NC}"
cat > .env << ENV_EOF
# TURN Server Configuration
# TURN Server Configuration (time-limited credentials via TURN REST API)
TURN_HOST=$SERVER_IP
TURN_USERNAME=dograh
TURN_PASSWORD=$TURN_PASSWORD
TURN_SECRET=$TURN_SECRET
# Telemetry (set to false to disable)
ENABLE_TELEMETRY=true