Skip to content

Commit c4ae3cf

Browse files
committed
Merge branch 'main' of github.com:romkey/pdxhackerspace-hackstack
2 parents 9eb68b2 + 9babe15 commit c4ae3cf

15 files changed

Lines changed: 271 additions & 787 deletions

File tree

.gitignore

Lines changed: 96 additions & 348 deletions
Large diffs are not rendered by default.

.gitignore.initial

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
**/*.env
1111

12+
*~
13+
1214
avahi-dns/services
1315

1416
home-assistant/config/

auto_planka

bin/install-audio-satellite.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
source ./lib.sh
4+
5+
install_default_config snapclient snapcast
6+
start_app snapclient
7+
8+
echo "Do you want to install Airplay (shairport-sync) support? (yes/no)"
9+
read answer
10+
11+
if [ "$answer" = "yes" ]; then
12+
install_default_config shairport-sync shairport-sync
13+
start_app shairport-sync
14+
else
15+
echo "Skipping Airplay (shairport-sync)"
16+
fi
17+
18+
install_default_config watchtower

bin/install-core.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
. ./lib.sh
4+
5+
start_app nginx-proxy-manager
6+
start_app dnsmasq
7+

bin/install-debian.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/sh
2+
3+
echo "This script will install and start Docker. After running it you should install"
4+
echo "individual applications by running 'docker compose up -d' in each application's"
5+
echo "directory, or run an install script for a stack of applications."
6+
echo
7+
echo "This script uses `sudo` to run items as root; you'll be prompted at least once at"
8+
echo "the start to enter your password in order to allow this"
9+
10+
sudo apt update && apt upgrade -y
11+
sudo apt install pwgen curl software-properties-common -y
12+
13+
if ! command -v docker &> /dev/null; then
14+
echo "Docker not found. Installing Docker..."
15+
16+
# sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
17+
sudo apt install -y apt-transport-https ca-certificates curl
18+
sudo install -m 0755 -d /etc/apt/keyrings
19+
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
20+
sudo chmod a+r /etc/apt/keyrings/docker.asc
21+
22+
# sudo add-apt-repository "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
23+
sudo echo \
24+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
25+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
26+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
27+
28+
sudo apt update
29+
# sudo apt install -y docker-ce docker-ce-cli containerd.io
30+
sudo apt install -y docker-ce docker-ce-cli
31+
32+
sudo systemctl start docker
33+
sudo systemctl enable docker
34+
35+
if command -v docker &> /dev/null; then
36+
echo "Docker installed successfully!"
37+
else
38+
echo "Docker installation failed."
39+
exit 1
40+
fi
41+
else
42+
echo "Docker is already installed."
43+
fi

bin/install-zigbee-satellite.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
. ./bin/lib.sh
4+
5+
install_default_config zigbee2mqtt
6+
start_app zigbee2mqtt
7+
8+
install_default_config watchtower
9+
start_app zigbee2mqtt

bin/lib.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# lib.sh
2+
# meant to be included in other scripts and not run directly
3+
# source ./lib.sh
4+
5+
start_app() {
6+
cd "$1"
7+
if ! docker compose ps | grep -q 'Up'; then
8+
echo "Docker Compose project is not running. Starting it..."
9+
docker compose up -d
10+
echo "$1 started."
11+
else
12+
echo "$1 is already running."
13+
fi
14+
15+
cd ..
16+
}
17+
18+
install_default_config() {
19+
if [ -n "$2" ]; then
20+
cp "$1/config/$2.default" "$1/config/$2"
21+
echo "Installed $1/config/$2 - you should review this file for possible configuration changes"
22+
fi
23+
24+
if [ -f "$1/.env.example" ]; then
25+
cp "$1/.env.example" "$1/.env"
26+
echo "installed $1/.env - you should review this file for possible configuration changes"
27+
fi
28+
}

home-assistant/docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ services:
77
restart: unless-stopped
88
volumes:
99
- ../../lib/home-assistant:/config
10+
# these make images available to mqtt2template without exposing lots of other
11+
# data or making them accidentally available through other services
12+
# this also makes it easy for mqtt2template to check how recent an image is or if it's valid
13+
- ../../lib/mqtt2template/websites/outside/images:/config/websites/outside
1014
- /etc/localtime:/etc/localtime:ro
1115
- /run/dbus:/run/dbus:ro
1216
networks:

mopidy/config/mopidy.conf

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)