backups and refactor

This commit is contained in:
Didier Slof 2022-12-31 16:38:33 +01:00
parent f66961bda3
commit c9c64c0166
Signed by: didier
GPG key ID: 01E71F18AA4398E5
10 changed files with 51 additions and 75 deletions

View file

@ -1,24 +0,0 @@
#!/bin/bash
fatal() {
echo "FATAL: $@"
exit 1
}
echo "# installing docker"
sudo apt update || fatal "something went wrong"
sudo apt install "docker*" || fatal "something went wrong"
echo "# check groups"
if ! groups | grep docker; then
sudo usermod $USER -aG docker
fatal "please relog to enter docker group"
fi
echo "# network"
docker network create proxy
echo "# web"
[ -d /srv/www ] || sudo mkdir -p /srv/www
sudo chmod a+rw /srv/www
git clone git@git.faulty.nl:infra/web /srv/www