this repo has no description
1#!/usr/bin/env bash
2
3echo
4echo
5echo "Got new commit: $(date)"
6echo "---"
7echo
8
9# pull latest version
10git fetch --all
11git reset --hard origin/main
12
13echo "git fetched!"
14
15cat <<BODY | curl -d @- http://compuper:6500/notify
16name=vps%3A%20git%20($(git log -1 --pretty=format:%h))\
17&timeout=5000\
18&body=fetched%20latest%20git%20commit%20for%20vielle.dev/pi-config\
19&key=pi/commit/git
20BODY
21
22# restart/rebuild all containers
23docker compose build
24docker compose up -d --force-recreate --remove-orphans
25
26# clear out dockerfiles to stop my drive exploding
27docker system prune -af
28
29cat <<BODY | curl -d @- http://compuper:6500/notify
30name=pi%3A%20ready%20($(git log -1 --pretty=format:%h))
31&timeout=5000
32&body=finished%20building%20docker
33&key=pi/commit/build
34BODY
35
36exit 0