Initial version of 'yarr'
This commit is contained in:
parent
050b315cc0
commit
4d2cdb80ad
12 changed files with 245 additions and 0 deletions
21
products/yarr/calibre.tf
Normal file
21
products/yarr/calibre.tf
Normal file
|
@ -0,0 +1,21 @@
|
|||
module "calibre" {
|
||||
source = "../../docker/service"
|
||||
image = "technosoft2000/calibre-web"
|
||||
service_name = "calibre"
|
||||
stack_name = var.stack_name
|
||||
remote_volumes = {
|
||||
"/books" = module.media
|
||||
}
|
||||
volumes = {
|
||||
"calibre-config" = "/config"
|
||||
}
|
||||
networks = [module.network]
|
||||
converge_enable = false
|
||||
traefik = {
|
||||
domain = "calibre.${var.traefik.domain}"
|
||||
ssl = true
|
||||
port = 8083
|
||||
middlewares = ["forward-auth"]
|
||||
}
|
||||
placement_constraints = var.placement_constraints
|
||||
}
|
32
products/yarr/inputs.tf
Normal file
32
products/yarr/inputs.tf
Normal file
|
@ -0,0 +1,32 @@
|
|||
variable "stack_name" {
|
||||
description = "The name of the stack"
|
||||
type = string
|
||||
default = "yarr"
|
||||
}
|
||||
variable "bind_paths" {
|
||||
description = "The paths to the service"
|
||||
type = object({
|
||||
media = string
|
||||
books = string
|
||||
})
|
||||
}
|
||||
variable "placement_constraints" {
|
||||
description = "Docker Swarm placement constraints"
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
variable "traefik" {
|
||||
default = null
|
||||
type = object({
|
||||
domain = string
|
||||
port = optional(number)
|
||||
non-ssl = optional(bool, true)
|
||||
ssl = optional(bool, false)
|
||||
rule = optional(string)
|
||||
network = optional(object({
|
||||
name = string
|
||||
id = string
|
||||
}))
|
||||
})
|
||||
description = "Whether to enable traefik for the service."
|
||||
}
|
24
products/yarr/lidarr.tf
Normal file
24
products/yarr/lidarr.tf
Normal file
|
@ -0,0 +1,24 @@
|
|||
module "lidarr" {
|
||||
source = "../../docker/service"
|
||||
image = "lscr.io/linuxserver/lidarr:latest"
|
||||
service_name = "lidarr"
|
||||
stack_name = var.stack_name
|
||||
remote_volumes = {
|
||||
"/media" = module.media
|
||||
}
|
||||
volumes = {
|
||||
"lidarr-config" = "/config"
|
||||
}
|
||||
mounts = {
|
||||
"/etc/localtime" = "/etc/localtime"
|
||||
}
|
||||
networks = [module.network]
|
||||
converge_enable = false
|
||||
traefik = {
|
||||
domain = "lidarr.${var.traefik.domain}"
|
||||
ssl = true
|
||||
port = 8686
|
||||
middlewares = ["forward-auth"]
|
||||
}
|
||||
placement_constraints = var.placement_constraints
|
||||
}
|
21
products/yarr/mylarr.tf
Normal file
21
products/yarr/mylarr.tf
Normal file
|
@ -0,0 +1,21 @@
|
|||
module "mylar" {
|
||||
source = "../../docker/service"
|
||||
image = "lscr.io/linuxserver/mylar3:latest"
|
||||
service_name = "mylar"
|
||||
stack_name = var.stack_name
|
||||
remote_volumes = {
|
||||
"/media" = module.media
|
||||
}
|
||||
volumes = {
|
||||
"mylar-config" = "/config"
|
||||
}
|
||||
networks = [module.network]
|
||||
converge_enable = false
|
||||
traefik = {
|
||||
domain = "mylar.${var.traefik.domain}"
|
||||
ssl = true
|
||||
port = 8090
|
||||
middlewares = ["forward-auth"]
|
||||
}
|
||||
placement_constraints = var.placement_constraints
|
||||
}
|
4
products/yarr/network.tf
Normal file
4
products/yarr/network.tf
Normal file
|
@ -0,0 +1,4 @@
|
|||
module "network" {
|
||||
source = "../../docker/network"
|
||||
stack_name = var.stack_name
|
||||
}
|
32
products/yarr/plex.tf
Normal file
32
products/yarr/plex.tf
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
module "plex" {
|
||||
source = "../../docker/service"
|
||||
image = "lscr.io/linuxserver/plex"
|
||||
service_name = "plex"
|
||||
stack_name = var.stack_name
|
||||
remote_volumes = {
|
||||
"/media" = module.media
|
||||
}
|
||||
volumes = {
|
||||
"plex-config" = "/config"
|
||||
}
|
||||
networks = [module.network]
|
||||
converge_enable = false
|
||||
traefik = merge(var.traefik, {
|
||||
domain = "plex.${var.traefik.domain}"
|
||||
port = 32400
|
||||
middlewares = ["forward-auth"]
|
||||
})
|
||||
placement_constraints = var.placement_constraints
|
||||
ports = [
|
||||
{ container = 32469, host = 32469 },
|
||||
{ container = 32400, host = 32400 },
|
||||
{ container = 32401, host = 32401 },
|
||||
{ container = 3005, host = 3005 },
|
||||
{ container = 8324, host = 8324 },
|
||||
{ container = 32410, host = 32410, protocol = "udp" },
|
||||
{ container = 32412, host = 32412, protocol = "udp" },
|
||||
{ container = 32413, host = 32413, protocol = "udp" },
|
||||
{ container = 32414, host = 32414, protocol = "udp" },
|
||||
]
|
||||
}
|
21
products/yarr/radarr.tf
Normal file
21
products/yarr/radarr.tf
Normal file
|
@ -0,0 +1,21 @@
|
|||
module "radarr" {
|
||||
source = "../../docker/service"
|
||||
image = "lscr.io/linuxserver/radarr:latest"
|
||||
service_name = "radarr"
|
||||
stack_name = var.stack_name
|
||||
remote_volumes = {
|
||||
"/media" = module.media
|
||||
}
|
||||
volumes = {
|
||||
"radarr-config" = "/config"
|
||||
}
|
||||
networks = [module.network]
|
||||
converge_enable = false
|
||||
traefik = {
|
||||
domain = "radarr.${var.traefik.domain}"
|
||||
ssl = true
|
||||
port = 7878
|
||||
middlewares = ["forward-auth"]
|
||||
}
|
||||
placement_constraints = var.placement_constraints
|
||||
}
|
21
products/yarr/readarr.tf
Normal file
21
products/yarr/readarr.tf
Normal file
|
@ -0,0 +1,21 @@
|
|||
module "readarr" {
|
||||
source = "../../docker/service"
|
||||
image = "lscr.io/linuxserver/readarr:develop"
|
||||
service_name = "readarr"
|
||||
stack_name = var.stack_name
|
||||
remote_volumes = {
|
||||
"/media" = module.media
|
||||
}
|
||||
volumes = {
|
||||
"readarr-config" = "/config"
|
||||
}
|
||||
networks = [module.network]
|
||||
converge_enable = false
|
||||
traefik = {
|
||||
domain = "readarr.${var.traefik.domain}"
|
||||
ssl = true
|
||||
port = 8787
|
||||
middlewares = ["forward-auth"]
|
||||
}
|
||||
placement_constraints = var.placement_constraints
|
||||
}
|
23
products/yarr/rtorrent.tf
Normal file
23
products/yarr/rtorrent.tf
Normal file
|
@ -0,0 +1,23 @@
|
|||
module "rtorrent" {
|
||||
source = "../../docker/service"
|
||||
image = "lscr.io/linuxserver/rutorrent"
|
||||
service_name = "rtorrent"
|
||||
stack_name = var.stack_name
|
||||
ports = [{ container = 36258, host = 36258 }]
|
||||
remote_volumes = {
|
||||
"/media" = module.media
|
||||
}
|
||||
volumes = {
|
||||
"rtorrent-config" = "/config"
|
||||
}
|
||||
networks = [module.network]
|
||||
converge_enable = false
|
||||
#healthcheck = ["CMD-SHELL","nc -z localhost 36258"]
|
||||
traefik = {
|
||||
domain = "rtorrent.${var.traefik.domain}"
|
||||
ssl = true
|
||||
port = 80
|
||||
middlewares = ["forward-auth"]
|
||||
}
|
||||
placement_constraints = var.placement_constraints
|
||||
}
|
21
products/yarr/sonarr.tf
Normal file
21
products/yarr/sonarr.tf
Normal file
|
@ -0,0 +1,21 @@
|
|||
module "sonarr" {
|
||||
source = "../../docker/service"
|
||||
image = "lscr.io/linuxserver/sonarr:latest"
|
||||
service_name = "sonarr"
|
||||
stack_name = var.stack_name
|
||||
remote_volumes = {
|
||||
"/media" = module.media
|
||||
}
|
||||
volumes = {
|
||||
"sonarr-config" = "/config"
|
||||
}
|
||||
networks = [module.network]
|
||||
converge_enable = false
|
||||
traefik = {
|
||||
domain = "sonarr.${var.traefik.domain}"
|
||||
ssl = true
|
||||
port = 8989
|
||||
middlewares = ["forward-auth"]
|
||||
}
|
||||
placement_constraints = var.placement_constraints
|
||||
}
|
13
products/yarr/terraform.tf
Normal file
13
products/yarr/terraform.tf
Normal file
|
@ -0,0 +1,13 @@
|
|||
terraform {
|
||||
required_version = "~> 1.6"
|
||||
required_providers {
|
||||
docker = {
|
||||
source = "kreuzwerker/docker"
|
||||
version = "~> 3.0"
|
||||
}
|
||||
random = {
|
||||
source = "hashicorp/random"
|
||||
version = "~> 3.3"
|
||||
}
|
||||
}
|
||||
}
|
12
products/yarr/volumes.tf
Normal file
12
products/yarr/volumes.tf
Normal file
|
@ -0,0 +1,12 @@
|
|||
module "media" {
|
||||
source = "../../docker/volume"
|
||||
stack_name = var.stack_name
|
||||
volume_name = "media"
|
||||
bind_path = var.bind_paths.media
|
||||
}
|
||||
module "books" {
|
||||
source = "../../docker/volume"
|
||||
stack_name = var.stack_name
|
||||
volume_name = "books"
|
||||
bind_path = var.bind_paths.books
|
||||
}
|
Loading…
Reference in a new issue