resilio added

This commit is contained in:
Nemo 2018-02-19 03:21:32 +05:30
parent d37b5a8b33
commit a24610ff4e
4 changed files with 68 additions and 1 deletions

View File

@ -49,6 +49,13 @@ module "tt-rss" {
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"

View File

@ -33,6 +33,6 @@ resource docker_container "ombi" {
links = [
"${var.links-emby}",
"${docker_container.sonarr.name}",
"${docker_container.radarr.name}"
"${docker_container.radarr.name}",
]
}

51
resilio/main.tf Normal file
View File

@ -0,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,
))}"
}

9
resilio/variables.tf Normal file
View File

@ -0,0 +1,9 @@
variable "traefik-labels" {
type = "map"
}
variable "ips" {
type = "map"
}
variable "domain" {}