forked from Kpa-clawbot/CoreScope
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-live.sh
More file actions
27 lines (20 loc) · 699 Bytes
/
Copy pathdeploy-live.sh
File metadata and controls
27 lines (20 loc) · 699 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
#!/bin/bash
set -e
DEPLOY_DIR="$(cd "$(dirname "$0")" && pwd)"
MATOMO_COMMIT="38c30f9"
cd "$DEPLOY_DIR"
echo "[deploy] Fetching latest from origin..."
git fetch origin
echo "[deploy] Resetting to origin/master..."
git reset --hard origin/master
echo "[deploy] Building Docker image..."
docker build -t meshcore-analyzer .
echo "[deploy] Stopping old container (30s grace period)..."
docker stop -t 30 meshcore-analyzer && docker rm meshcore-analyzer
docker run -d --name meshcore-analyzer \
--restart unless-stopped \
-p 3000:3000 \
-v "$(pwd)/config.json:/app/config.json:ro" \
-v meshcore-data:/app/data \
meshcore-analyzer
echo "[deploy] Done. Live at https://analyzer.on8ar.eu"