-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathupdate.sh
More file actions
31 lines (21 loc) · 727 Bytes
/
update.sh
File metadata and controls
31 lines (21 loc) · 727 Bytes
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
#!/bin/bash
set -e
# Quick update script for arxiv2md
# Run this after pushing changes to GitHub
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
APP_DIR="/root/arxiv2md"
echo -e "${GREEN}Updating arxiv2md...${NC}"
cd $APP_DIR
echo -e "${YELLOW}[1/4] Pulling latest changes...${NC}"
git pull origin main
echo -e "${YELLOW}[2/4] Rebuilding Docker image...${NC}"
docker-compose build
echo -e "${YELLOW}[3/4] Restarting containers...${NC}"
docker-compose up -d
echo -e "${YELLOW}[4/4] Checking health...${NC}"
sleep 5
curl -f http://localhost:8001/health && echo -e "\n${GREEN}Update complete!${NC}" || echo -e "\n${RED}Health check failed!${NC}"
echo ""
echo -e "${GREEN}View logs with: docker-compose logs -f${NC}"