update setup.sh

- modified the setup script so that if users change the default admin username / password for hummingbot api it will also change the fields in the docker compose file as well.
This commit is contained in:
david-hummingbot
2025-07-29 06:50:35 +08:00
committed by GitHub
parent 39190c4102
commit f519b02045

View File

@@ -111,6 +111,26 @@ EOF
echo -e "${GREEN}✅ .env file created successfully!${NC}"
echo ""
# Update docker-compose.yml with new credentials
echo -e "${GREEN}🔧 Updating docker-compose.yml with new credentials...${NC}"
# Update BACKEND_API_USERNAME and BACKEND_API_PASSWORD in docker-compose.yml
if [ -f "docker-compose.yml" ]; then
# Create a backup of the original file
cp docker-compose.yml docker-compose.yml.backup
# Update the credentials using sed
sed -i "s/BACKEND_API_USERNAME=.*/BACKEND_API_USERNAME=$USERNAME/" docker-compose.yml
sed -i "s/BACKEND_API_PASSWORD=.*/BACKEND_API_PASSWORD=$PASSWORD/" docker-compose.yml
echo -e "${GREEN}✅ docker-compose.yml updated successfully!${NC}"
echo -e "${BLUE}📋 Updated credentials:${NC} Username: $USERNAME, Password: $PASSWORD"
else
echo -e "${YELLOW}⚠️ Warning: docker-compose.yml not found in current directory${NC}"
fi
echo ""
# Display configuration summary
echo -e "${BLUE}📋 Configuration Summary${NC}"
echo "======================="