-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·43 lines (34 loc) · 1.14 KB
/
install.sh
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
#!/usr/bin/env bash
set -e
notes () {
cat << EOF
======== WARM TIPS ========
Before you submit any github issue, please do the following check:
* make sure the docker daemon is running
* make sure you use docker compose v2: recommend 2.x.x, got $(docker compose version --short 2>/dev/null || echo not install)
* check your internet connection if timeout happens
* check for potential port conflicts if you have local services listening on all interfaces (e.g. another redis container listening on *:6379)
===========================
EOF
}
trap notes ERR
if ! docker info >/dev/null 2>&1; then
echo "Docker daemon or Docker Desktop is not running... please check" 2>&1
false
exit 1
fi
DOWNLOAD_URL='https://github.com/apitable/apitable.github.io/releases/latest/download/docker-compose.tar.gz'
mkdir -p apitable
cd apitable || exit 1
: "${DOWNLOAD_URL?✗ missing env}"
curl -fLo docker-compose.tar.gz "${DOWNLOAD_URL}"
tar -xvzf docker-compose.tar.gz
docker compose down -v --remove-orphans
for i in {1..50}; do
if docker compose pull; then
if docker compose up -d; then
break
fi
fi
sleep 6
done