Skip to content

Commit 73ab9c1

Browse files
committed
fix: homepage config moved to here
1 parent 4ac792c commit 73ab9c1

File tree

15 files changed

+350
-33
lines changed

15 files changed

+350
-33
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ mariadb/
44
postgres/
55
compose_restart.log
66
.ssh
7+
infra/configs/homepage/logs

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,36 @@
77
Setup Scripts For A HomelAB
88
99
```
10-
* **Create .env file**
1110

12-
`cp env.sample .env`
11+
Avaialable Services
12+
13+
***arr**
14+
- glutune - VPN service
15+
- qbittorrent- Torrent client
16+
- purgarr -
17+
- qbitmanage
18+
- radarr
19+
- sonarr
20+
- swurApp
21+
- readarr
22+
- flaresolverr
23+
- prowlarr
24+
- jackett
25+
- recyclarr
26+
- bazarr
27+
- unpackerr
28+
1329

14-
* **Start Services**
1530

16-
`docker-compose --env-file=.env up -d`
1731

18-
* **Container IP Address**
1932

20-
`docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <Container Name>`
2133

2234

35+
### Debug
36+
37+
* **Container IP Address**
38+
`docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <Container Name>`
39+
2340
### Usefull Links
2441

2542
* [Inter Container Networking](https://github.com/qdm12/gluetun-wiki/blob/main/setup/inter-containers-networking.md)

debian_post_install.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,6 @@ usermod -aG docker $USER
6868

6969
echo -e "${GREEN}Docker Installed.${NC}"
7070

71-
# Install Portainer
72-
echo -e "${GREEN}Installing Portainer.${NC}"
73-
docker volume create portainer_data
74-
75-
docker run -d -p 9000:9000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
76-
77-
echo -e "${GREEN}Portainer Installed.${NC}"
78-
echo -e "${GREEN}-------------------------------------------------Done-------------------------------------------------${NC}"
79-
8071

8172
#Build media directory structure
8273

@@ -95,8 +86,6 @@ echo -e "${GREEN}-------------------------------------------------Done----------
9586

9687
echo -e "${GREEN}Media directory structure created!${NC}"
9788

98-
#create docker network called group
99-
docker network create arr && echo -e "${GREEN}Docker network 'arr' created.${NC}"
10089

10190
echo -e "${GREEN}Installing FFProbe${NC}"
10291

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
name: Homelab Setup
2+
services:
3+
portainer-ce:
4+
image: portainer/portainer-ce:latest
5+
container_name: portainer
6+
ports:
7+
- 9000:9000
8+
restart: always
9+
volumes:
10+
- /var/run/docker.sock:/var/run/docker.sock
11+
- /data/portainer_data:/data
212
include:
313
- ./arr/docker-compose.yml
414
- ./infra/docker-compose.yml

down_and_up.sh

Lines changed: 81 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,94 @@
11
#!/bin/bash
22

3-
./logo.sh
3+
source .env
44

5-
echo "$(date)"
5+
COMPOSE_DIR=${COMPOSE_DIR}
6+
NETWORK_NAME=${NETWORK_NAME}
7+
NETWORK_SUBNET=${NETWORK_SUBNET}
68

7-
COMPOSE_DIR="/home/druv/druv_setup"
89

9-
cd "$COMPOSE_DIR" || { echo "Error: Could not change to directory $COMPOSE_DIR"; exit 1; }
10+
setup_environment() {
11+
if [ -x "./logo.sh" ]; then
12+
./logo.sh
13+
else
14+
echo "Warning: logo.sh not found or not executable."
15+
fi
1016

11-
echo "Stopping Docker Compose services..."
17+
echo "$(date): Starting service management routine."
1218

13-
docker compose down
19+
if ! cd "$COMPOSE_DIR"; then
20+
echo "Error: Could not change to directory $COMPOSE_DIR" >&2
21+
exit 1
22+
fi
23+
echo "Switched to directory: $COMPOSE_DIR"
24+
}
1425

15-
sleep 5
26+
docker_down() {
27+
echo "Stopping Docker Compose services..."
1628

17-
echo "Starting Docker Compose services..."
29+
if ! docker compose down --remove-orphans; then
30+
echo "Failed to stop services" >&2
31+
exit 1
32+
fi
1833

19-
if [ "$1" == "--all" ]; then
20-
echo "Rebuilding all services..."
21-
docker system prune -a -f
22-
docker network create --subnet=172.18.0.0/24 homelab
23-
fi
34+
echo "Services stopped successfully."
35+
sleep 5
36+
}
2437

38+
prune_and_network_setup() {
39+
echo "--- Full Rebuild Initiated ---"
2540

26-
docker compose up -d --remove-orphans --build --force-recreate
41+
echo "Pruning entire Docker system (-a -f)..."
42+
if ! docker system prune -a -f; then
43+
echo "Warning: Docker system prune failed, but continuing with service restart." >&2
44+
fi
2745

28-
echo "Docker Compose services down and restarted."
46+
echo "Creating/ensuring network '$NETWORK_NAME' with subnet '$NETWORK_SUBNET'..."
47+
if ! docker network create --subnet="$NETWORK_SUBNET" "$NETWORK_NAME"; then
48+
echo "Warning: Failed to create/ensure network '$NETWORK_NAME'. Compose will use defaults." >&2
49+
fi
50+
}
51+
52+
docker_kill() {
53+
echo "Killing all running Docker containers..."
54+
55+
if ! docker kill $(docker ps -q); then
56+
echo "Warning: Failed to kill some or all containers." >&2
57+
fi
58+
59+
echo "All running Docker containers have been killed."
60+
}
61+
62+
docker_up() {
63+
echo "Starting Docker Compose services with rebuild and force-recreate..."
64+
65+
if ! docker compose up -d --remove-orphans --build --force-recreate; then
66+
echo "Failed to start services" >&2
67+
echo "Killing all running Docker containers and retrying..."
68+
docker_kill
69+
if ! docker compose up -d --remove-orphans --build --force-recreate; then
70+
echo "Retry failed: Could not start services" >&2
71+
exit 1
72+
fi
73+
exit 1
74+
fi
75+
76+
echo "Docker Compose services down and successfully restarted."
77+
}
78+
79+
80+
81+
main() {
82+
setup_environment
83+
84+
if [ "$1" == "--all" ]; then
85+
prune_and_network_setup
86+
fi
87+
88+
docker_down
89+
90+
docker_up
91+
}
92+
93+
94+
main "$@"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Bookmarks:
2+
- Qdrant Dashboard:
3+
- icon: https://qdrant.tech/img/qdrant-logo.svg
4+
description: Vector Search Engine
5+
href: http://192.168.1.10:6333/dashboard

infra/configs/homepage/custom.css

Whitespace-only changes.

infra/configs/homepage/custom.js

Whitespace-only changes.

infra/configs/homepage/docker.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# For configuration options and examples, please see:
2+
# https://gethomepage.dev/latest/configs/docker/
3+
# my-docker:
4+
# host: 127.0.0.1
5+
# port: 2375
6+
# my-docker:
7+
# socket: /var/run/docker.sock
8+
druv-docker:
9+
host: dockerproxy
10+
port: 2375
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
# sample kubernetes config

0 commit comments

Comments
 (0)