Updated: one-click installation bash script that includes the output information after the container starts, such as the admin web management URL and default login credentials
This commit is contained in:
+16
-14
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
REPO_URL="https://github.com/operacle/checkcle.git"
|
|
||||||
CLONE_DIR="/opt/checkcle"
|
|
||||||
DATA_DIR="/opt/pb_data"
|
DATA_DIR="/opt/pb_data"
|
||||||
PORT=8090
|
PORT=8090
|
||||||
|
COMPOSE_FILE="/opt/docker-compose.yml"
|
||||||
|
RAW_URL="https://raw.githubusercontent.com/operacle/checkcle/main/docker-compose.yml"
|
||||||
|
|
||||||
echo "🚀 Installing Checkcle from $REPO_URL"
|
echo "🚀 Installing Checkcle using Docker Compose"
|
||||||
|
|
||||||
# Step 1: Check if port 8090 is already in use
|
# Step 1: Check if port is already in use
|
||||||
if lsof -i :"$PORT" &>/dev/null; then
|
if lsof -i :"$PORT" &>/dev/null; then
|
||||||
echo "❗ ERROR: Port $PORT is already in use. Please free the port or change the Docker Compose configuration."
|
echo "❗ ERROR: Port $PORT is already in use. Please free the port or change the Docker Compose configuration."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -27,13 +27,12 @@ if ! docker compose version &> /dev/null; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Step 4: Clone the repository
|
# Step 4: Download docker-compose.yml if not exists
|
||||||
if [ -d "$CLONE_DIR" ]; then
|
if [ ! -f "$COMPOSE_FILE" ]; then
|
||||||
echo "📁 Directory $CLONE_DIR already exists. Pulling latest changes..."
|
echo "📥 Downloading docker-compose.yml to $COMPOSE_FILE..."
|
||||||
git -C "$CLONE_DIR" pull
|
curl -fsSL "$RAW_URL" -o "$COMPOSE_FILE"
|
||||||
else
|
else
|
||||||
echo "📥 Cloning repo to $CLONE_DIR"
|
echo "✅ docker-compose.yml already exists at $COMPOSE_FILE"
|
||||||
git clone "$REPO_URL" "$CLONE_DIR"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Step 5: Create data volume directory if it doesn’t exist
|
# Step 5: Create data volume directory if it doesn’t exist
|
||||||
@@ -44,16 +43,19 @@ if [ ! -d "$DATA_DIR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Step 6: Start the service
|
# Step 6: Start the service
|
||||||
cd "$CLONE_DIR"
|
cd /opt
|
||||||
echo "📦 Starting Checkcle service with Docker Compose..."
|
echo "📦 Starting Checkcle service with Docker Compose..."
|
||||||
docker compose up -d
|
docker compose -f "$COMPOSE_FILE" up -d
|
||||||
|
|
||||||
# Step 7: Show success output
|
# Step 7: Detect host IP address
|
||||||
|
HOST_IP=$(hostname -I | awk '{print $1}')
|
||||||
|
|
||||||
|
# Step 8: Show success output
|
||||||
echo ""
|
echo ""
|
||||||
echo "✅ Checkcle has been successfully installed and started."
|
echo "✅ Checkcle has been successfully installed and started."
|
||||||
echo ""
|
echo ""
|
||||||
echo "🛠️ Admin Web Management"
|
echo "🛠️ Admin Web Management"
|
||||||
echo "🔗 Default URL: http://0.0.0.0:$PORT"
|
echo "🔗 Default URL: http://$HOST_IP:$PORT"
|
||||||
echo "👤 User: admin@example.com"
|
echo "👤 User: admin@example.com"
|
||||||
echo "🔑 Passwd: Admin123456"
|
echo "🔑 Passwd: Admin123456"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user