This commit is contained in:
Ari committed 2024-01-30 16:41:42 -05:00
1 parent 3ee533514f
commit 2f6c01dda2
10 files changed
+139

No files matched your search

File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
View File
Whitespace-only changes.
+13
View File
@@ -0,0 +1,13 @@
version: "3.8"
services:
dockge:
image: louislam/dockge:1
restart: unless-stopped
ports:
- 5050:5001
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/homelab/data:/app/data
- /opt/homelab/stacks:/opt/homelab/stacks
environment:
- DOCKGE_STACKS_DIR=/opt/homelab/stacks
+94
View File
@@ -0,0 +1,94 @@
#!/bin/sh
function update-os {
# Updating
sudo apt-get update -y
sudo apt-get upgrade -y
}
function remove-bad-package {
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt autoremove -y
}
function instsall-core-package {
sudo apt install -y \
git \
jq \
nfs-common
sh <(curl -L https://nixos.org/nix/install) --daemon
}
function install-docker {
echo "Add Docker's official GPG key..."
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "Set up Docker's APT repository..."
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/raspbian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update -y
echo "Install docker..."
sudo apt-get install -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin
}
function install-docker-compose-systemd {
sudo mkdir -p /etc/docker/compose/
sudo cp systemd/docker-compose@.service /etc/systemd/system/docker-compose@.service
}
function mount-nfs-torrents {
sudo cp /etc/fstab /etc/fstab.backup
sudo mkdir -p /torrents
sudo echo "truenas.local:/mnt/EightTerra/DownloadedTorrents /torrents/ nfs auto 0 0" | sudo tee -a /etc/fstab
sudo mount -a
}
function install-qbittorrent {
sudo useradd -r -m qbittorrent
sudo usermod -a -G qbittorrent $USER
sudo apt install -y qbittorrent-nox
sudo cp systemd/qbittorrent.service /etc/systemd/system/qbittorrent.service
sudo systemctl start qbittorrent
sudo systemctl enable qbittorrent
}
function install-speedtest-cli {
mkdir -p $HOME/.local/bin
mkdir -p $HOME/tmp/speedtest
pushd $HOME/tmp/speedtest/
wget https://github.com/librespeed/speedtest-cli/releases/download/v1.0.10/librespeed-cli_1.0.10_linux_armv7.tar.gz
tar -xvf librespeed-cli_1.0.10_linux_armv7.tar.gz
cp librespeed-cli $HOME/.local/bin/speedtest-cli
popd
rm -rf $HOME/tmp/speedtest
}
function install-transmission {
sudo apt-get install transmission-daemon
sudo ufw allow 9091,51413/tcp
}
function set-static-ip() {
ip=${1}
intf=${2:-eth0}
routerip=${3:-192.168.8.1}
echo "
# <---- AUTOGENERATED --->
interface $intf
static_routers=$routerip
static ip_address=$ip/24
# <---- AUTOGENERATED --->
" | tee -a /etc/dhcpcd.conf
}
+3
View File
@@ -0,0 +1,3 @@
# Raspberry Pi 2
Since these do not support nix & linuxservices docker images
@@ -0,0 +1,14 @@
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory=/etc/docker/compose/%i
ExecStart=/usr/bin/docker compose up -d --remove-orphans
ExecStop=/usr/bin/docker compose down
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,15 @@
[Unit]
Description=qBittorrent
After=network.target
[Service]
Type=forking
User=qbittorrent
Group=qbittorrent
UMask=002
ExecStart=/usr/bin/qbittorrent-nox \
-d --webui-port=8080
Restart=on-failure
[Install]
WantedBy=multi-user.target