mirror of
https://github.com/d0zingcat/deploy.git
synced 2026-05-13 15:09:33 +00:00
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:
20
setup.sh
20
setup.sh
@@ -111,6 +111,26 @@ EOF
|
|||||||
echo -e "${GREEN}✅ .env file created successfully!${NC}"
|
echo -e "${GREEN}✅ .env file created successfully!${NC}"
|
||||||
echo ""
|
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
|
# Display configuration summary
|
||||||
echo -e "${BLUE}📋 Configuration Summary${NC}"
|
echo -e "${BLUE}📋 Configuration Summary${NC}"
|
||||||
echo "======================="
|
echo "======================="
|
||||||
|
|||||||
Reference in New Issue
Block a user