Compare commits

...

3 Commits

Author SHA1 Message Date
mr-vercetti
5fcb61e4c9 Add slskd 2025-01-02 23:16:17 +01:00
mr-vercetti
94994a678f Add crontab, modify mgmt script, temp VPN fix 2025-01-02 21:21:08 +01:00
mr-vercetti
24f4ec532f Get back to gluetun, cleanup 2025-01-02 21:15:25 +01:00
13 changed files with 216 additions and 52 deletions

6
crontab Normal file
View File

@ -0,0 +1,6 @@
# SnapRAID
30 4 * * 0 python3 /opt/snapraid-runner/snapraid-runner.py --conf /etc/snapraid-runner.conf --ignore-deletethreshold
# LG TV renew dev mode (https://github.com/webosbrew/dev-manager-desktop)
0 * * * * /etc/tv-renew-devmode.sh >> /var/log/tv-renew-devmode.log 2>&1
# DNS issues fix with Torguard
0 5 * * * /apps/homeserver/docker/torguard-fix.sh

View File

@ -86,3 +86,13 @@ GHOSTFOLIO_DB_USER=
GHOSTFOLIO_DB_PASSWORD=
GHOSTFOLIO_DB_URL=postgresql://${GHOSTFOLIO_DB_USER}:${GHOSTFOLIO_DB_PASSWORD}@ghostfolio-db:5432/${GHOSTFOLIO_DB}?connect_timeout=300&sslmode=prefer
GHOSTFOLIO_REDIS_PASSWORD=
# joplin
JOPLIN_POSTGRES_USER=
JOPLIN_POSTGRES_PASSWORD=
JOPLIN_POSTGRES_DB=
JOPLIN_BASE_URL=
# slskd
SLSKD_SLSK_USERNAME=
SLSKD_SLSK_PASSWORD=

View File

@ -0,0 +1,18 @@
services:
homarr:
container_name: homarr
image: ghcr.io/ajnart/homarr
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${APPS_DIR}/homarr/configs:/app/data/configs
- ${APPS_DIR}/homarr/icons:/app/public/icons
- ${APPS_DIR}/homarr/data:/data
networks:
- homarr
ports:
- '7575:7575'
restart: unless-stopped
networks:
homarr:
name: homarr

View File

@ -0,0 +1,43 @@
services:
joplin-db:
image: postgres:16
container_name: joplin-db
volumes:
- ${APPS_DIR}/joplin/postgres:/var/lib/postgresql/data
networks:
- joplin
ports:
- "5432:5432"
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=${JOPLIN_POSTGRES_PASSWORD}
- POSTGRES_USER=${JOPLIN_POSTGRES_USER}
- POSTGRES_DB=${JOPLIN_POSTGRES_DB}
joplin:
image: joplin/server
container_name: joplin
networks:
- proxy
- joplin
ports:
- "22300:22300"
environment:
- APP_PORT=22300
- APP_BASE_URL=${JOPLIN_BASE_URL}
- DB_CLIENT=pg
- POSTGRES_PASSWORD=${JOPLIN_POSTGRES_PASSWORD}
- POSTGRES_DATABASE=${JOPLIN_POSTGRES_DB}
- POSTGRES_USER=${JOPLIN_POSTGRES_USER}
- POSTGRES_PORT=5432
- POSTGRES_HOST=joplin-db
depends_on:
- joplin-db
restart: unless-stopped
networks:
proxy:
external:
name: proxy
joplin:
name: joplin

View File

@ -0,0 +1,33 @@
qbittorrentvpn:
image: binhex/arch-qbittorrentvpn
container_name: qbittorrentvpn
networks:
- media
cap_add:
- NET_ADMIN
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
- VPN_ENABLED=yes
- VPN_PROV=custom
- VPN_CLIENT=wireguard
- ENABLE_PRIVOXY=no
- LAN_NETWORK=${LAN_NETWORK}
- NAME_SERVERS=1.1.1.1, 1.0.0.1
- WEBUI_PORT=8183
- DEBUG=true
- UMASK=000
volumes:
- ${APPS_DIR}/qbittorrentvpn:/config
- ${DATA_DIR}/downloads:/data
- /etc/localtime:/etc/localtime:ro
ports:
- 8183:8183
- 8118:8118
- 6881:6881
- 6881:6881/udp
sysctls:
- "net.ipv4.conf.all.src_valid_mark=1"
privileged: true
restart: unless-stopped

View File

@ -1,27 +1,50 @@
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Please provide command to execute: 'up', 'stop' or 'restart'"
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ $# -lt 1 ]; then
echo "Please provide command to execute: 'up', 'stop', 'restart', or 'recreate'"
exit 1
fi
command="$1"
for stack in stacks/*/*
do
case "$command" in
"up")
docker-compose -f "${stack}" --env-file .env up -d
;;
"stop")
docker-compose -f "${stack}" --env-file .env stop
;;
"restart")
docker-compose -f "${stack}" --env-file .env restart
;;
*)
echo "Wrong command. Please use 'up', 'stop' or 'restart'"
case "$command" in
"up")
for stack in "$BASE_DIR"/stacks/*/*
do
docker-compose -f "${stack}" --env-file "$BASE_DIR/.env" up -d
done
;;
"stop" | "restart")
for stack in "$BASE_DIR"/stacks/*/*
do
docker-compose -f "${stack}" --env-file "$BASE_DIR/.env" $command
done
;;
"recreate")
if [ $# -lt 3 ]; then
echo "Please provide both the stack name and the service to recreate"
echo "Usage: $0 recreate <stack_name> <service_name>"
exit 1
;;
esac
done
fi
stack_name="$2"
service="$3"
stack_file="$BASE_DIR/stacks/${stack_name}/${stack_name}.yml"
if [ ! -f "$stack_file" ]; then
echo "Stack file '$stack_file' does not exist"
exit 1
fi
docker-compose -f "${stack_file}" --env-file "$BASE_DIR/.env" stop "$service"
docker-compose -f "${stack_file}" --env-file "$BASE_DIR/.env" rm -f "$service"
docker-compose -f "${stack_file}" --env-file "$BASE_DIR/.env" up -d "$service"
;;
*)
echo "Wrong command. Please use 'up', 'stop', 'restart', or 'recreate'"
exit 1
;;
esac

View File

@ -1,6 +1,6 @@
services:
collabora:
image: collabora/code
image: collabora/code:24.04.6.1.1
container_name: collabora
environment:
- password=${COLLABORA_PASSWORD}

View File

@ -13,7 +13,9 @@ services:
- gluetun
ports:
# qbittorrent
- '8183:8183'
- "8183:8183"
# slskd
- "5030:5030"
networks:
gluetun:

View File

@ -16,6 +16,7 @@ services:
- ${APPS_DIR}/jellyfin:/config
- ${DATA_DIR}/media/movies:/data/movies:ro
- ${DATA_DIR}/media/tvshows:/data/tvshows:ro
- ${DATA_DIR}/media/music:/data/music:ro
ports:
- 8096:8096
devices:
@ -36,7 +37,7 @@ services:
- ${DATA_DIR}/media/music:/media
radarr:
image: lscr.io/linuxserver/radarr:4.3.2
image: lscr.io/linuxserver/radarr
container_name: radarr
networks:
- media
@ -129,38 +130,20 @@ services:
- 8686:8686
restart: unless-stopped
qbittorrentvpn:
image: binhex/arch-qbittorrentvpn
container_name: qbittorrentvpn
networks:
- media
cap_add:
- NET_ADMIN
qbittorrent:
image: linuxserver/qbittorrent
container_name: qbittorrent
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
- VPN_ENABLED=yes
- VPN_PROV=custom
- VPN_CLIENT=wireguard
- ENABLE_PRIVOXY=yes
- LAN_NETWORK=${LAN_NETWORK}
- NAME_SERVERS=1.1.1.1, 1.0.0.1
- WEBUI_PORT=8183
- DEBUG=true
- UMASK=000
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
- UMASK_SET=022
- WEBUI_PORT=8183
network_mode: "container:gluetun"
volumes:
- ${APPS_DIR}/qbittorrentvpn:/config
- ${DATA_DIR}/downloads:/data
- /etc/localtime:/etc/localtime:ro
ports:
- 8183:8183
- 8118:8118
- 6881:6881
- 6881:6881/udp
sysctls:
- "net.ipv4.conf.all.src_valid_mark=1"
privileged: true
- ${APPS_DIR}/qbittorrent/config:/config
- ${DATA_DIR}/downloads:/downloads
- ${APPS_DIR}/qbittorrent/vuetorrent:/vuetorrent
restart: unless-stopped
ytdl-material:

View File

@ -0,0 +1,17 @@
services:
slskd:
image: slskd/slskd
container_name: slskd
user: ${PUID}:${PGID}
environment:
- TZ=${TIMEZONE}
- SLSKD_REMOTE_FILE_MANAGEMENT=true
- SLSKD_SLSK_USERNAME=${SLSKD_SLSK_USERNAME}
- SLSKD_SLSK_PASSWORD=${SLSKD_SLSK_PASSWORD}
- SLSKD_SHARED_DIR=/app/downloads
network_mode: "container:gluetun"
volumes:
- ${APPS_DIR}/slskd:/app/data
- ${DATA_DIR}/downloads/slskd/incomplete:/app/incomplete
- ${DATA_DIR}/media/music:/app/downloads
restart: unless-stopped

View File

@ -0,0 +1,17 @@
services:
widmocc:
image: mrvercetti/widmocc
container_name: widmocc
networks:
- widmocc
- proxy
ports:
- 1313:80
restart: unless-stopped
networks:
proxy:
external:
name: proxy
widmocc:
name: widmocc

12
docker/torguard-fix.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
dir="/apps/homeserver/docker/appdata/gluetun/wireguard"
file="$dir/wg0.conf"
file_old="$dir/wg0.conf.old"
file_tmp="$dir/wg0.conf.tmp"
mv $file $file_tmp
mv $file_old $file
mv $file_tmp $file_old
bash /apps/homeserver/docker/mgmt.sh recreate media qbittorrentvpn