+7
-7
commit.sh
+7
-7
commit.sh
···
3
echo "\n\nGot new commit: $(date)\n---\n\n"
4
5
# pull latest version
6
git fetch --all
7
git reset --hard origin/master
8
9
-
# curl \
10
-
# -d "name=vps%3A%20git%20($(git log -1 --pretty=format:%h))\
11
-
# &timeout=5000\
12
-
# &body=fetched%20latest%20git%20commit%20for%20vielle.dev/vps-config\
13
-
# &key=vps/commit/git" \
14
-
# http://compuper:6500/notify
15
-
16
cat <<BODY | curl -d @- http://compuper:6500/notify
17
name=vps%3A%20git%20($(git log -1 --pretty=format:%h))
18
&timeout=5000
···
21
BODY
22
23
# restart/rebuild all containers
24
docker compose build --no-cache
25
docker compose up -d --force-recreate
26
27
# clear out dockerfiles to stop my drive exploding
28
docker system prune -af > /dev/null
29
30
cat <<- BODY | curl -d @- http://compuper:6500/notify
31
name=vps%3A%20ready%20($(git log -1 --pretty=format:%h))\
32
&timeout=5000
···
3
echo "\n\nGot new commit: $(date)\n---\n\n"
4
5
# pull latest version
6
+
echo "git fetch --all"
7
git fetch --all
8
+
echo "git reset --hard origin/master"
9
git reset --hard origin/master
10
11
+
echo "cat <<BODY | curl -d @- http://compuper:6500/notify"
12
cat <<BODY | curl -d @- http://compuper:6500/notify
13
name=vps%3A%20git%20($(git log -1 --pretty=format:%h))
14
&timeout=5000
···
17
BODY
18
19
# restart/rebuild all containers
20
+
echo "docker compose build --no-cache"
21
docker compose build --no-cache
22
+
echo "docker compose up -d --force-recreate"
23
docker compose up -d --force-recreate
24
25
# clear out dockerfiles to stop my drive exploding
26
+
echo "docker system prune -af > /dev/null"
27
docker system prune -af > /dev/null
28
29
+
echo "cat <<- BODY | curl -d @- http://compuper:6500/notify"
30
cat <<- BODY | curl -d @- http://compuper:6500/notify
31
name=vps%3A%20ready%20($(git log -1 --pretty=format:%h))\
32
&timeout=5000