Config files for my server. Except not my secrets
1#!/usr/bin/env bash
2
3echo "\n\nGot new commit: $(date)\n---\n\n"
4
5# pull latest version
6git fetch --all
7git 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
16cat <<BODY | curl -d @- http://compuper:6500/notify
17name=vps%3A%20git%20($(git log -1 --pretty=format:%h))
18&timeout=5000
19&body=fetched%20latest%20git%20commit%20for%20vielle.dev/vps-config
20&key=vps/commit/git
21BODY
22
23# restart/rebuild all containers
24docker compose build --no-cache
25docker compose up -d --force-recreate
26
27# clear out dockerfiles to stop my drive exploding
28docker system prune -af > /dev/null
29
30cat <<- BODY | curl -d @- http://compuper:6500/notify
31name=vps%3A%20ready%20($(git log -1 --pretty=format:%h))\
32&timeout=5000
33&body=finished%20building%20docker
34&key=vps/commit/build
35BODY
36
37exit 0