- Added detailed labels to the deployment script for IndeedHub, including title, version, description, license, icon, and repository URL. - Updated package dependencies in package.json and package-lock.json, including upgrading 'nostr-tools' to version 2.23.0 and adding 'axios' and '@tanstack/vue-query'. - Improved README with a modern description of the platform and updated project structure details. This commit enhances the clarity of the deployment process and ensures the project is using the latest dependencies for better performance and features.
93 lines
4.0 KiB
Bash
Executable File
93 lines
4.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Configuration
|
|
REMOTE_SERVER="archipelago@192.168.1.228"
|
|
REMOTE_DIR="/tmp/indeedhub-build"
|
|
CONTAINER_NAME="indeedhub"
|
|
IMAGE_NAME="localhost/indeedhub:latest"
|
|
|
|
echo "╔════════════════════════════════════════════════════════════════╗"
|
|
echo "║ Deploying Indeedhub to Archipelago Dev Server ║"
|
|
echo "╚════════════════════════════════════════════════════════════════╝"
|
|
echo ""
|
|
|
|
# Step 1: Sync source code to remote server
|
|
echo "📦 Step 1: Syncing source code to remote server..."
|
|
echo " (You may be prompted for SSH password)"
|
|
rsync -avz --exclude 'node_modules' --exclude 'dist' --exclude '.git' --exclude '.cursor' \
|
|
-e "ssh -o PreferredAuthentications=keyboard-interactive,password" \
|
|
. "$REMOTE_SERVER:$REMOTE_DIR/"
|
|
echo " ✅ Source code synced"
|
|
|
|
# Step 2: Build and deploy on remote server
|
|
echo ""
|
|
echo "📦 Step 2: Building and deploying on remote server..."
|
|
ssh -o PreferredAuthentications=keyboard-interactive,password -t "$REMOTE_SERVER" bash <<'REMOTE_SCRIPT'
|
|
set -e
|
|
|
|
cd /tmp/indeedhub-build
|
|
CONTAINER_NAME="indeedhub"
|
|
IMAGE_NAME="localhost/indeedhub:latest"
|
|
|
|
echo ""
|
|
echo " Building Docker image with Podman..."
|
|
sudo podman build --platform linux/amd64 -t "$IMAGE_NAME" .
|
|
|
|
echo ""
|
|
echo " Stopping existing container (if any)..."
|
|
sudo podman stop "$CONTAINER_NAME" 2>/dev/null || true
|
|
sudo podman rm "$CONTAINER_NAME" 2>/dev/null || true
|
|
|
|
echo ""
|
|
echo " Starting new container..."
|
|
sudo podman run -d \
|
|
--name "$CONTAINER_NAME" \
|
|
--restart unless-stopped \
|
|
-p 7777:7777 \
|
|
--label "com.archipelago.app=indeedhub" \
|
|
--label "com.archipelago.title=IndeedHub" \
|
|
--label "com.archipelago.version=0.1.0" \
|
|
--label "com.archipelago.category=media" \
|
|
--label "com.archipelago.description.short=Decentralized media streaming platform" \
|
|
--label "com.archipelago.description.long=IndeedHub is a decentralized media streaming platform built on Nostr. Stream Bitcoin-focused documentaries, educational content, and independent films. Netflix-inspired interface with glassmorphism design, supporting content creators through the decentralized web." \
|
|
--label "com.archipelago.license=MIT" \
|
|
--label "com.archipelago.icon=/assets/img/app-icons/indeedhub.png" \
|
|
--label "com.archipelago.port=7777" \
|
|
--label "com.archipelago.repo=https://github.com/indeedhub/indeedhub" \
|
|
--health-cmd "curl -f http://localhost:7777/health || exit 1" \
|
|
--health-interval 30s \
|
|
--health-timeout 10s \
|
|
--health-retries 3 \
|
|
--health-start-period 40s \
|
|
"$IMAGE_NAME"
|
|
|
|
echo ""
|
|
echo " ✅ Container started!"
|
|
echo ""
|
|
echo " Container status:"
|
|
sudo podman ps --filter "name=$CONTAINER_NAME" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
|
|
|
|
echo ""
|
|
echo " Cleaning up build directory..."
|
|
cd /tmp
|
|
rm -rf /tmp/indeedhub-build
|
|
|
|
REMOTE_SCRIPT
|
|
|
|
echo ""
|
|
echo "╔════════════════════════════════════════════════════════════════╗"
|
|
echo "║ ✅ INDEEDHUB DEPLOYED! ║"
|
|
echo "╚════════════════════════════════════════════════════════════════╝"
|
|
echo ""
|
|
echo "🎬 Access Indeedhub at:"
|
|
echo " • HTTP: http://192.168.1.228:7777"
|
|
echo " • HTTPS: https://192.168.1.228:7777 (if reverse proxy configured)"
|
|
echo ""
|
|
echo "📝 Useful commands:"
|
|
echo " • Check logs: ssh $REMOTE_SERVER 'sudo podman logs -f $CONTAINER_NAME'"
|
|
echo " • Check status: ssh $REMOTE_SERVER 'sudo podman ps | grep $CONTAINER_NAME'"
|
|
echo " • Restart: ssh $REMOTE_SERVER 'sudo podman restart $CONTAINER_NAME'"
|
|
echo " • Stop: ssh $REMOTE_SERVER 'sudo podman stop $CONTAINER_NAME'"
|
|
echo ""
|