resilio added
Diff
main.tf | 7 +++++++
media/ombi.tf | 2 +-
resilio/main.tf | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
resilio/variables.tf | 9 +++++++++
4 files changed, 68 insertions(+), 1 deletion(-)
@@ -49,6 +49,13 @@
traefik-labels = "${var.traefik-common-labels}"
}
module "resilio" {
source = "resilio"
domain = "sync.bb8.fun"
traefik-labels = "${var.traefik-common-labels}"
ips = "${var.ips}"
}
module "heimdall" {
source = "heimdall"
domain = "bb8.fun"
@@ -33,6 +33,6 @@
links = [
"${var.links-emby}",
"${docker_container.sonarr.name}",
"${docker_container.radarr.name}"
"${docker_container.radarr.name}",
]
}
@@ -1,0 +1,51 @@
data "docker_registry_image" "resilio-sync" {
name = "linuxserver/resilio-sync:latest"
}
resource "docker_image" "resilio-sync" {
name = "${data.docker_registry_image.resilio-sync.name}"
pull_triggers = ["${data.docker_registry_image.resilio-sync.sha256_digest}"]
}
resource "docker_container" "resilio-sync" {
name = "resilio-sync"
image = "${docker_image.resilio-sync.latest}"
restart = "unless-stopped"
destroy_grace_seconds = 30
must_run = true
ports {
internal = 8888
external = 8888
ip = "${var.ips["eth0"]}"
}
ports {
internal = 55555
external = 55555
ip = "${var.ips["eth0"]}"
}
volumes {
host_path = "/mnt/xwing/data/resilio-sync"
container_path = "/sync"
}
volumes {
host_path = "/mnt/xwing/config/resilio-sync"
container_path = "/config"
}
volumes {
host_path = "/mnt/xwing/media/DL"
container_path = "/downloads"
}
labels = "${merge(
var.traefik-labels,
map(
"traefik.frontend.rule", "Host:${var.domain}",
"traefik.port", 8888,
))}"
}
@@ -1,0 +1,9 @@
variable "traefik-labels" {
type = "map"
}
variable "ips" {
type = "map"
}
variable "domain" {}