Initial comit

This commit is contained in:
2022-12-07 21:40:25 -05:00
commit 924ae6ed02
4 changed files with 172 additions and 0 deletions

73
docker-compose.yml Normal file
View File

@@ -0,0 +1,73 @@
version: "3"
services:
bookvpn:
image: ghcr.io/bubuntux/nordvpn
cap_add:
- NET_ADMIN
- NET_RAW
environment:
- USER=djdietrick@gmail.com
- "PASS=i!quJjFZa2&l"
- CONNECT=United_States
- TECHNOLOGY=NordLynx
- NETWORK=192.168.1.0/24 # So it can be accessed within the local network
ports:
- 8084:8080
# - 8788:8787 # Readarr
# - 9118:9117 # Jackett
# - 9092:9091 # Transmission
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
booktransmission:
image: linuxserver/transmission:latest
network_mode: service:bookvpn
restart: unless-stopped
depends_on:
- bookvpn
volumes:
- /portainer/booktransmission:/config
- /media/books/downloads:/data
- /etc/localtime:/etc/localtime
environment:
- GROUPID=1000
- USERID=1000
- TRANSMISSION_DOWNLOAD_DIR=/data/completed
- TRANSMISSION_INCOMPLETE_DIR=/data/incomplete
- TRANSMISSION_WATCH_DIR=/data/watch
bookreadarr:
image: hotio/readarr:latest
network_mode: service:bookvpn
restart: unless-stopped
depends_on:
- bookvpn
volumes:
- /portainer/bookreadarr:/config
- /media/books/downloads:/downloads
- /media/books:/books
environment:
- PUID=1000
- GUID=1000
- TZ=America/New_York
bookjackett:
image: lscr.io/linuxserver/jackett:latest
network_mode: service:bookvpn
restart: unless-stopped
depends_on:
- bookvpn
volumes:
- /media/books/downloads:/downloads
- /portainer/bookjackett:/config
environment:
- PUID=1000
- PGID=1000
booknginxjackett:
image: nginx:jackett
container_name: nginx_jackett
build: ./nginx/
restart: unless-stopped
ports:
- 9118:9117
links:
- bookvpn:bookjackett
volumes:
- /etc/localtime:/etc/localtime:ro

6
nginx/Dockerfile Normal file
View File

@@ -0,0 +1,6 @@
FROM nginx:alpine
ADD nginx.conf /etc/nginx/nginx.conf
ADD wait-for /usr/bin
CMD ["/usr/bin/wait-for", "jackett:9117", "--","nginx", "-g", "daemon off;"]

14
nginx/nginx.conf Normal file
View File

@@ -0,0 +1,14 @@
events {
worker_connections 1024;
}
stream {
upstream jackettweb {
server jackett:9117 fail_timeout=5s max_fails=5;
}
server {
listen 9117;
proxy_pass jackettweb;
}
}

79
nginx/wait-for Normal file
View File

@@ -0,0 +1,79 @@
#!/bin/sh
TIMEOUT=15
QUIET=0
echoerr() {
if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi
}
usage() {
exitcode="$1"
cat << USAGE >&2
Usage:
$cmdname host:port [-t timeout] [-- command args]
-q | --quiet Do not output any status messages
-t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
-- COMMAND ARGS Execute command with args after the test finishes
USAGE
exit "$exitcode"
}
wait_for() {
for i in `seq $TIMEOUT` ; do
nc -z "$HOST" "$PORT" > /dev/null 2>&1
result=$?
if [ $result -eq 0 ] ; then
if [ $# -gt 0 ] ; then
exec "$@"
fi
exit 0
fi
sleep 1
done
echo "Operation timed out" >&2
exit 1
}
while [ $# -gt 0 ]
do
case "$1" in
*:* )
HOST=$(printf "%s\n" "$1"| cut -d : -f 1)
PORT=$(printf "%s\n" "$1"| cut -d : -f 2)
shift 1
;;
-q | --quiet)
QUIET=1
shift 1
;;
-t)
TIMEOUT="$2"
if [ "$TIMEOUT" = "" ]; then break; fi
shift 2
;;
--timeout=*)
TIMEOUT="${1#*=}"
shift 1
;;
--)
shift
break
;;
--help)
usage 0
;;
*)
echoerr "Unknown argument: $1"
usage 1
;;
esac
done
if [ "$HOST" = "" -o "$PORT" = "" ]; then
echoerr "Error: you need to provide a host and port to test."
usage 2
fi
wait_for "$@"