superbrain-server 1.0.49 → 1.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/superbrain.js +204 -204
- package/package.json +1 -1
- package/payload/.env.example +58 -58
- package/payload/Dockerfile +73 -73
- package/payload/docker-compose.yml +124 -124
- package/payload/start-docker-prod.sh +125 -125
- package/payload/start-docker.sh +56 -56
- package/payload/stop-docker.sh +16 -16
package/payload/start-docker.sh
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# SuperBrain Docker Setup Script
|
|
4
|
-
# One-click script to build and start the SuperBrain backend
|
|
5
|
-
|
|
6
|
-
set -e
|
|
7
|
-
|
|
8
|
-
echo "🐳 SuperBrain Docker Setup"
|
|
9
|
-
echo "=========================="
|
|
10
|
-
|
|
11
|
-
# Check if Docker is installed
|
|
12
|
-
if ! command -v docker &> /dev/null; then
|
|
13
|
-
echo "❌ Docker is not installed. Please install Docker first."
|
|
14
|
-
exit 1
|
|
15
|
-
fi
|
|
16
|
-
|
|
17
|
-
# Check if docker-compose or docker compose is available
|
|
18
|
-
if ! command -v docker compose &> /dev/null && ! command -v docker-compose &> /dev/null; then
|
|
19
|
-
echo "❌ Docker Compose is not installed. Please install Docker Compose first."
|
|
20
|
-
exit 1
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
# Use docker compose if available, otherwise docker-compose
|
|
24
|
-
if command -v docker compose &> /dev/null; then
|
|
25
|
-
DOCKER_COMPOSE="docker compose"
|
|
26
|
-
else
|
|
27
|
-
DOCKER_COMPOSE="docker-compose"
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
# Check if .env exists, if not create from example
|
|
31
|
-
if [ ! -f .env ]; then
|
|
32
|
-
echo "📝 Creating .env file from example..."
|
|
33
|
-
if [ -f .env.example ]; then
|
|
34
|
-
cp .env.example .env
|
|
35
|
-
echo "✅ Created .env file. Please edit it with your API keys."
|
|
36
|
-
else
|
|
37
|
-
echo "⚠️ No .env.example found, continuing without environment variables."
|
|
38
|
-
fi
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
# Build and start the container
|
|
42
|
-
echo "🔨 Building Docker image..."
|
|
43
|
-
$DOCKER_COMPOSE build
|
|
44
|
-
|
|
45
|
-
echo "🚀 Starting SuperBrain..."
|
|
46
|
-
$DOCKER_COMPOSE up -d
|
|
47
|
-
|
|
48
|
-
echo ""
|
|
49
|
-
echo "✅ SuperBrain is now running!"
|
|
50
|
-
echo "📖 API: http://localhost:5000"
|
|
51
|
-
echo "📚 Docs: http://localhost:5000/docs"
|
|
52
|
-
echo ""
|
|
53
|
-
echo "Useful commands:"
|
|
54
|
-
echo " $DOCKER_COMPOSE logs -f # View logs"
|
|
55
|
-
echo " $DOCKER_COMPOSE down # Stop the server"
|
|
56
|
-
echo " $DOCKER_COMPOSE restart # Restart the server"
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# SuperBrain Docker Setup Script
|
|
4
|
+
# One-click script to build and start the SuperBrain backend
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
echo "🐳 SuperBrain Docker Setup"
|
|
9
|
+
echo "=========================="
|
|
10
|
+
|
|
11
|
+
# Check if Docker is installed
|
|
12
|
+
if ! command -v docker &> /dev/null; then
|
|
13
|
+
echo "❌ Docker is not installed. Please install Docker first."
|
|
14
|
+
exit 1
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# Check if docker-compose or docker compose is available
|
|
18
|
+
if ! command -v docker compose &> /dev/null && ! command -v docker-compose &> /dev/null; then
|
|
19
|
+
echo "❌ Docker Compose is not installed. Please install Docker Compose first."
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Use docker compose if available, otherwise docker-compose
|
|
24
|
+
if command -v docker compose &> /dev/null; then
|
|
25
|
+
DOCKER_COMPOSE="docker compose"
|
|
26
|
+
else
|
|
27
|
+
DOCKER_COMPOSE="docker-compose"
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Check if .env exists, if not create from example
|
|
31
|
+
if [ ! -f .env ]; then
|
|
32
|
+
echo "📝 Creating .env file from example..."
|
|
33
|
+
if [ -f .env.example ]; then
|
|
34
|
+
cp .env.example .env
|
|
35
|
+
echo "✅ Created .env file. Please edit it with your API keys."
|
|
36
|
+
else
|
|
37
|
+
echo "⚠️ No .env.example found, continuing without environment variables."
|
|
38
|
+
fi
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# Build and start the container
|
|
42
|
+
echo "🔨 Building Docker image..."
|
|
43
|
+
$DOCKER_COMPOSE build
|
|
44
|
+
|
|
45
|
+
echo "🚀 Starting SuperBrain..."
|
|
46
|
+
$DOCKER_COMPOSE up -d
|
|
47
|
+
|
|
48
|
+
echo ""
|
|
49
|
+
echo "✅ SuperBrain is now running!"
|
|
50
|
+
echo "📖 API: http://localhost:5000"
|
|
51
|
+
echo "📚 Docs: http://localhost:5000/docs"
|
|
52
|
+
echo ""
|
|
53
|
+
echo "Useful commands:"
|
|
54
|
+
echo " $DOCKER_COMPOSE logs -f # View logs"
|
|
55
|
+
echo " $DOCKER_COMPOSE down # Stop the server"
|
|
56
|
+
echo " $DOCKER_COMPOSE restart # Restart the server"
|
package/payload/stop-docker.sh
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# SuperBrain Docker Stop Script
|
|
4
|
-
|
|
5
|
-
echo "🛑 Stopping SuperBrain..."
|
|
6
|
-
|
|
7
|
-
# Use docker compose if available, otherwise docker-compose
|
|
8
|
-
if command -v docker compose &> /dev/null; then
|
|
9
|
-
DOCKER_COMPOSE="docker compose"
|
|
10
|
-
else
|
|
11
|
-
DOCKER_COMPOSE="docker-compose"
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
$DOCKER_COMPOSE down
|
|
15
|
-
|
|
16
|
-
echo "✅ SuperBrain stopped."
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# SuperBrain Docker Stop Script
|
|
4
|
+
|
|
5
|
+
echo "🛑 Stopping SuperBrain..."
|
|
6
|
+
|
|
7
|
+
# Use docker compose if available, otherwise docker-compose
|
|
8
|
+
if command -v docker compose &> /dev/null; then
|
|
9
|
+
DOCKER_COMPOSE="docker compose"
|
|
10
|
+
else
|
|
11
|
+
DOCKER_COMPOSE="docker-compose"
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
$DOCKER_COMPOSE down
|
|
15
|
+
|
|
16
|
+
echo "✅ SuperBrain stopped."
|