57 lines
1002 B
HCL
57 lines
1002 B
HCL
data "docker_registry_image" "ru-torrent" {
|
|
name = "linuxserver/rutorrent"
|
|
}
|
|
|
|
resource "docker_image" "ru-torrent" {
|
|
name = data.docker_registry_image.ru-torrent.name
|
|
pull_triggers = [data.docker_registry_image.ru-torrent.sha256_digest]
|
|
}
|
|
|
|
resource "docker_network" "ru-torrent" {
|
|
name = "ru-torrent"
|
|
}
|
|
|
|
resource "docker_container" "ru-torrent" {
|
|
image = docker_image.ru-torrent.image_id
|
|
name = "ru-torrent"
|
|
|
|
env = [
|
|
"PUID=777",
|
|
"PGID=321",
|
|
"UMASK=002",
|
|
"TZ=Europe/Amsterdam"
|
|
]
|
|
|
|
mounts {
|
|
target = "/config"
|
|
source = "/share/appdata/ru-torrent"
|
|
type = "bind"
|
|
}
|
|
|
|
mounts {
|
|
target = "/downloads"
|
|
source = "/share/Download"
|
|
type = "bind"
|
|
}
|
|
|
|
mounts {
|
|
target = "/data/torrents"
|
|
source = "/share/datarr/torrents"
|
|
type = "bind"
|
|
}
|
|
|
|
restart = "always"
|
|
|
|
networks_advanced {
|
|
name = docker_network.bridge.name
|
|
ipv4_address = "192.168.2.121"
|
|
}
|
|
|
|
lifecycle {
|
|
ignore_changes = [
|
|
ulimit,
|
|
log_opts
|
|
]
|
|
}
|
|
}
|