Skip to content

Commit

Permalink
Merge pull request #56 from jgwehr/feature/ripping-machine
Browse files Browse the repository at this point in the history
WIP for Automatic Ripping Machine
  • Loading branch information
jgwehr authored Nov 8, 2022
2 parents 08cdf52 + 43d4511 commit 10efdff
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 18 deletions.
31 changes: 19 additions & 12 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,21 @@ TZ=
DOCKERDIR=~/Docker/dockerfiles
STATICONFIGDIR=~/Docker/staticconfig
CONFIGDIR=~/server/config
CACHEDIR=~/server/cache
CACHEDIR=/srv/cache
TRANSCODEDIR=/tmp/transcode

DATADIR=/data
DOWNLOADDIR=/data/downloads
MEDIADIR=/data/media
STATICDIR=/data/media/staticfiles
DBDIR=/data/db
LOGDIR=~/server/logs
LOGDIR=/srv/logs


DEBUG_LOG=false
LOG_LEVEL=ERROR

#Caddy
DOMAIN=
EMAIL_ADMIN=
BOUNCER_CADDY_TOKEN=

#Ports
# Ports
PORT_CADDY_HTTP=
PORT_CADDY_HTTPS=
PORT_CROWDSEC_API=
Expand Down Expand Up @@ -53,10 +49,21 @@ PORT_LIDARR_UI=
PORT_RADARR_UI=
PORT_SONARR_UI=

#Diun


####################
# Service Specific
####################

# Caddy
DOMAIN=
EMAIL_ADMIN=
BOUNCER_CADDY_TOKEN=

# Diun
DIUN_NOTIF_DISCORD_WEBHOOKURL=

#DuckDNS
# DuckDNS
DUCKDNS_SUBDOMAINLIST=
DUCKDNS_TOKEN=

Expand All @@ -66,11 +73,11 @@ ESSH_MAXLINES= #The length of each line is randomized. This controls the maximum
ESSH_MAXCLIENTS= #Maximum number of connections to accept at a time. Connections beyond this are not immediately rejected, but will wait in the queue.
ESSH_BINDFAMILY= #Set it to 4 or 6 to bind to IPv4 only or IPv6 only, respectively. Leave blank to bind to both.

#Jellyfin
# Jellyfin
JELLYFIN_URL=
GID_HARDWAREACC=

#ProtonVPN
# ProtonVPN
PROTONVPN_USERNAME=
PROTONVPN_PASSWORD=
PROTONVPN_TIER=
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Includes:
- <img src="https://github.com/walkxcode/Dashboard-Icons/blob/main/png/uptime-kuma.png" width="32" alt="Uptime Kuma" /> Uptime Kuma
- <img src="https://caddy-forum-uploads.s3.amazonaws.com/original/2X/3/3859a874d26640df74a3b951d8052a3c3e749eed.png" width="32" alt="Caddy" /> Caddy
- <img src="https://github.com/walkxcode/Dashboard-Icons/blob/main/png/crowdsec.png" width="32" alt="CrowdSec" /> CrowdSec
- Endlessh
- <img src="https://github.com/walkxcode/Dashboard-Icons/blob/main/png/duckdns.png" width="32" alt="DuckDNS" /> DuckDNS
- <img src="https://github.com/walkxcode/Dashboard-Icons/blob/main/png/dozzle.png" width="32" alt="Dozzle" /> Dozzle
- <img src="https://raw.githubusercontent.com/crazy-max/diun/master/.res/diun.png" width="32" alt="Diun" /> Diun
Expand Down
18 changes: 12 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ services:
- ${STATICONFIGDIR}/caddy/Caddyfile:/etc/caddy/Caddyfile:ro # Required. Needs to be an extension-less file NOT a directory
- ${CONFIGDIR}:/data # Optional, house for certs. Caddy adds its own /caddy/ directory
- ${CONFIGDIR}:/config # Optional, JSON Config files. Caddy adds its own /caddy/ directory
- ${LOGDIR}/caddy:/server/logs/caddy
- ${STATICDIR}/tandoor_media:/www/tandoor:ro # recipe image files for Tandoor

deploy:
Expand Down Expand Up @@ -295,6 +294,9 @@ services:
UMASK_SET: 022
WEBUI_PORT: ${PORT_TORRENT_UI}

labels:
- "diun.enable=true"

volumes:
- ${CONFIGDIR}/qbt:/config
- ${DOWNLOADDIR}:/data/downloads
Expand All @@ -307,9 +309,9 @@ services:
healthcheck:
test: ls /sys/class/net/ | grep -o "eth[0-9*]|wg[0-9*]" > /dev/null || exit 1 # VPN Killswitch. Check to see if the wg0 interface is available, or fail. the protonvpn container supplies wg0.
interval: 30s
timeout: 4s
retries: 0
start_period: 10s
timeout: 6s
retries: 3
start_period: 20s
restart: unless-stopped

prowlarr:
Expand All @@ -327,6 +329,9 @@ services:
PGID: ${PGID}
TZ: ${TZ}

labels:
- "diun.enable=true"

volumes:
- ${CONFIGDIR}/prowlarr:/config

Expand Down Expand Up @@ -414,7 +419,6 @@ services:
TZ: ${TZ}
SUBDOMAINS: ${DUCKDNS_SUBDOMAINLIST}
TOKEN: ${DUCKDNS_TOKEN}
LOG_FILE: ${LOGDIR}/duckdns.log #optional

volumes:
- ${CONFIGDIR}/duckdns:/config #optional
Expand Down Expand Up @@ -570,13 +574,15 @@ services:
# - ${CONFIGDIR}/crowdsec:/etc/crowdsec/ # This is my preferred way to get things working, but currently doesn't work

## Log Files
- ${LOGDIR}/caddy:/var/log/caddy:ro ## check https://hub.crowdsec.net/author/crowdsecurity/configurations/caddy-logs
- /var/log/auth.log:/logs/auth.log:ro
- /var/log/syslog.log:/logs/syslog.log:ro

labels:
- "diun.enable=true"

healthcheck:
test: ["CMD", "cscli", "version"]

deploy:
resources:
limits:
Expand Down
11 changes: 11 additions & 0 deletions extra-services/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This folder exists to separate infrequently-used or "odds and ends" out from the core services.

While not ideal from an environment variable management standpoint, it's what works for now.

The main concern is port reservation. This README also serves as documentation to avoid conflict. You can of course changes these at your own risk.

### Ports

| Service | Ports |
| :-- | :-: |
| auto-ripping-machine | `7010` |
35 changes: 35 additions & 0 deletions extra-services/auto-ripping-machine/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
COMPOSE_PROJECT_NAME=
COMPOSE_TIMEOUT=300

PUID=
PGID=
TZ=
DOCKERDIR=~/Docker/dockerfiles
STATICONFIGDIR=~/Docker/staticconfig
CONFIGDIR=/srv/docker-config
CACHEDIR=/srv/cache

DATADIR=/data
DOWNLOADDIR=/data/downloads
MEDIADIR=/data/media
STATICDIR=/data/media/staticfiles
DBDIR=/data/db
LOGDIR=/srv/logs


DEBUG_LOG=false
LOG_LEVEL=ERROR

# Ports
PORT_RIPPING=7010 #for web access to ARM. Required for initial setup



####################
# Service Specific
####################

# Automatic Ripping Machine
RIPPING_UID=
RIPPING_GID=
RIPPING_HOME=/home/ripper
39 changes: 39 additions & 0 deletions extra-services/auto-ripping-machine/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: "3.9"

services:
automatic-ripping-machine:
container_name: automatic-ripping-machine
image: 1337server/automatic-ripping-machine:latest

privileged: true

ports:
- ${PORT_RIPPING}:8080

environment:
ARM_UID: ${RIPPING_UID}
ARM_GID: ${RIPPING_GID}

devices:
- /dev/sr0:/dev/sr0

labels:
- "diun.enable=true"

volumes:
- ${CONFIGDIR}/ripping:/etc/arm/config
- /etc/localtime:/etc/localtime:ro

- ${RIPPING_HOME}:/home/arm
- ${LOGDIR}/ripping:/home/arm/logs

- ${DOWNLOADDIR}/rips/video:/home/arm/media/completed
- ${DOWNLOADDIR}/rips/music:/home/arm/Music


deploy:
resources:
limits:
cpus: '5'
memory: 2048M #for a single rip, ARM is not RAM limited.
restart: 'no'

0 comments on commit 10efdff

Please sign in to comment.