Repository navigation
Expand file tree
/
Copy pathinstall.sh
More file actions
103 lines (88 loc) 路 3.83 KB
/
Copy pathinstall.sh
File metadata and controls
103 lines (88 loc) 路 3.83 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env bash
# =================================================================
# Instagram Saved Posts Tracker - 1-Command Installer
# GitHub: https://github.com/gitnasr/Instagram-Saved-Posts
# =================================================================
set -e
# Color codes
CYAN='\033[0;36m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BOLD='\033[1m'
NC='\033[0m' # No Color
# Print Banner
echo -e "${CYAN}${BOLD}"
cat << "EOF"
___ _ ____
|_ _|_ __ ___| |_ __ _ / ___| __ ___ _____
| || '_ \/ __| __/ _` | \___ \ / _` \ \ / / _ \
| || | | \__ \ || (_| | ___) | (_| |\ V / __/
|___|_| |_|___/\__\__,_| |____/ \__,_| \_/ \___|
馃摳 Instagram Saved Posts Tracker - Self-Hosted
EOF
echo -e "${NC}"
echo -e "${CYAN}==>${NC} Starting 1-command installation...\n"
# Check Docker installation
if ! command -v docker >/dev/null 2>&1; then
echo -e "${RED}[ERROR] Docker is not installed.${NC}"
echo -e "Please install Docker first: https://docs.docker.com/engine/install/"
exit 1
fi
# Check Docker Compose (v2 plugin or standalone)
if docker compose version >/dev/null 2>&1; then
DOCKER_COMPOSE="docker compose"
elif command -v docker-compose >/dev/null 2>&1; then
DOCKER_COMPOSE="docker-compose"
else
echo -e "${RED}[ERROR] Docker Compose is not installed.${NC}"
echo -e "Please install Docker Compose: https://docs.docker.com/compose/install/"
exit 1
fi
# Target installation directory
INSTALL_DIR="${HOME}/instagram-saved-posts"
if [ -n "$1" ]; then
INSTALL_DIR="$1"
fi
echo -e "${CYAN}==>${NC} Installing into directory: ${BOLD}${INSTALL_DIR}${NC}"
mkdir -p "${INSTALL_DIR}"
cd "${INSTALL_DIR}"
# Download production docker-compose.yml
echo -e "${CYAN}==>${NC} Downloading Docker Compose configuration..."
COMPOSE_URL="https://raw.githubusercontent.com/gitnasr/Instagram-Saved-Posts/master/docker-compose.yml"
curl -fsSL "${COMPOSE_URL}" -o docker-compose.yml
# Download .env.example
ENV_URL="https://raw.githubusercontent.com/gitnasr/Instagram-Saved-Posts/master/.env.example"
curl -fsSL "${ENV_URL}" -o .env.example
# If .env does not exist, copy from .env.example
if [ ! -f .env ]; then
cp .env.example .env
fi
# Pull and launch containers
echo -e "${CYAN}==>${NC} Pulling latest container images and starting services..."
${DOCKER_COMPOSE} pull
${DOCKER_COMPOSE} up -d
# Completion Banner
HOST_IP=$(hostname -I 2>/dev/null | awk '{print $1}' || echo "localhost")
RESOLVED_APP_PORT=$(${DOCKER_COMPOSE} port app 3000 2>/dev/null | awk -F: '{print $NF}')
PORT="${RESOLVED_APP_PORT:-5050}"
RESOLVED_QDRANT_PORT=$(${DOCKER_COMPOSE} port qdrant 6333 2>/dev/null | awk -F: '{print $NF}')
QDRANT_PORT="${RESOLVED_QDRANT_PORT:-6335}"
echo -e "\n${GREEN}${BOLD}======================================================${NC}"
echo -e "${GREEN}${BOLD} 馃帀 InstaSave Tracker is successfully installed!${NC}"
echo -e "${GREEN}${BOLD}======================================================${NC}\n"
echo -e "Access your instance at:"
echo -e " 馃憠 Web App: ${CYAN}${BOLD}http://localhost:${PORT}${NC}"
if [ "$HOST_IP" != "localhost" ]; then
echo -e " 馃憠 Network Web App: ${CYAN}${BOLD}http://${HOST_IP}:${PORT}${NC}"
fi
echo -e " 馃憠 Qdrant Dashboard: ${CYAN}${BOLD}http://localhost:${QDRANT_PORT}/dashboard${NC}"
echo -e "\nNext steps:"
echo -e " 1. Open ${CYAN}http://localhost:${PORT}${NC} in your browser."
echo -e " 2. Complete the quick 60-second onboarding wizard."
echo -e " 3. Start archiving and exploring your saved posts!\n"
echo -e "To manage your instance:"
echo -e " ${YELLOW}cd ${INSTALL_DIR}${NC}"
echo -e " ${YELLOW}${DOCKER_COMPOSE} logs -f${NC} # View live logs"
echo -e " ${YELLOW}${DOCKER_COMPOSE} restart${NC} # Restart services"
echo -e " ${YELLOW}${DOCKER_COMPOSE} down${NC} # Stop services\n"