-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·48 lines (42 loc) · 1.35 KB
/
Copy pathstart.sh
File metadata and controls
executable file
·48 lines (42 loc) · 1.35 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
44
45
46
47
48
#!/bin/bash
# Display banner
echo "========================================"
echo " MindRoot Deployment Script"
echo "========================================"
echo ""
# Check if credentials already exist
if [ ! -f .env ]; then
echo "No credentials found. Generating new credentials..."
./generate_credentials.sh
else
echo "Existing credentials found in .env file."
echo "To generate new credentials, delete the .env file and run this script again."
echo ""
# Load existing credentials for display
source .env
echo "Current Admin Username: $ADMIN_USER"
echo "Current Admin Password: $ADMIN_PASS"
echo ""
fi
# Make sure generate_credentials.sh is executable
chmod +x generate_credentials.sh
# Start Docker Compose
echo "Starting MindRoot with Docker Compose..."
docker-compose up -d
# Check if startup was successful
if [ $? -eq 0 ]; then
echo ""
echo "MindRoot is now running!"
echo "Access the web interface at: http://localhost:8010"
echo ""
echo "Admin credentials can be found in credentials.txt"
echo ""
echo "To stop MindRoot, run: docker-compose down"
echo "========================================"
else
echo ""
echo "Error: Failed to start MindRoot."
echo "Please check the logs with: docker-compose logs"
echo "========================================"
exit 1
fi