Browse Source

Cleanup and comment unused stuff

tf-0.12
Nemo 11 months ago
parent
commit
735279b0c1
  1. 8
      docker/images.tf
  2. 5
      firefox-sync.tf
  3. 2
      gitea/data.tf
  4. 110
      media/airsonic.tf
  5. 68
      media/bazarr.tf
  6. 60
      media/gonic.tf
  7. 48
      media/jellyfin.tf
  8. 62
      media/mylar.tf
  9. 6
      monitoring/config/prometheus.yml
  10. 2
      rss-bridge.tf
  11. 10
      stringer.tf
  12. 2
      variables.tf

8
docker/images.tf

@ -13,7 +13,7 @@ resource "docker_image" "ubooquity" {
pull_triggers = ["${data.docker_registry_image.ubooquity.sha256_digest}"]
}
resource "docker_image" "lychee" {
name = "${data.docker_registry_image.lychee.name}"
pull_triggers = ["${data.docker_registry_image.lychee.sha256_digest}"]
}
# resource "docker_image" "lychee" {
# name = "${data.docker_registry_image.lychee.name}"
# pull_triggers = ["${data.docker_registry_image.lychee.sha256_digest}"]
# }

5
firefox-sync.tf

@ -10,6 +10,11 @@ module "firefox-sync" {
host = "firesync.${var.root-domain}"
}
resource {
memory = "400"
memory_swap = "400"
}
volumes = [{
host_path = "/mnt/xwing/data/firefox-sync"
container_path = "/data"

2
gitea/data.tf

@ -1,7 +1,7 @@
# https://github.com/go-gitea/gitea/releases
data "docker_registry_image" "gitea" {
# not bleeding, this is hemorrhaging edge
name = "gitea/gitea:1.10"
name = "gitea/gitea:1.11"
}
data "docker_registry_image" "redis" {

110
media/airsonic.tf

@ -1,67 +1,67 @@
module "airsonic" {
source = "../modules/container"
image = "linuxserver/airsonic:latest"
name = "airsonic"
# module "airsonic" {
# source = "../modules/container"
# image = "linuxserver/airsonic:latest"
# name = "airsonic"
resource {
memory = "1024"
memory_swap = "1024"
}
# resource {
# memory = "1024"
# memory_swap = "1024"
# }
web {
port = 4040
host = "airsonic.bb8.fun"
expose = true
}
# web {
# port = 4040
# host = "airsonic.bb8.fun"
# expose = true
# }
networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
# networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
env = [
"PUID=1004",
"PGID=1003",
"TZ=Asia/Kolkata",
"JAVA_OPTS=-Xmx512m -Dserver.use-forward-headers=true -Dserver.context-path=/",
]
# env = [
# "PUID=1004",
# "PGID=1003",
# "TZ=Asia/Kolkata",
# "JAVA_OPTS=-Xmx512m -Dserver.use-forward-headers=true -Dserver.context-path=/",
# ]
devices = [{
host_path = "/dev/snd"
container_path = "/dev/snd"
}]
# devices = [{
# host_path = "/dev/snd"
# container_path = "/dev/snd"
# }]
# files = [
# "/usr/lib/jvm/java-1.8-openjdk/jre/lib/airsonic.properties",
# "/usr/lib/jvm/java-1.8-openjdk/jre/lib/sound.properties",
# ]
# # files = [
# # "/usr/lib/jvm/java-1.8-openjdk/jre/lib/airsonic.properties",
# # "/usr/lib/jvm/java-1.8-openjdk/jre/lib/sound.properties",
# # ]
# contents = [
# "${data.template_file.airsonic-properties-file.rendered}",
# "${file("${path.module}/conf/airsonic.sound.properties")}",
# ]
# # contents = [
# # "${data.template_file.airsonic-properties-file.rendered}",
# # "${file("${path.module}/conf/airsonic.sound.properties")}",
# # ]
volumes = [
{
host_path = "/mnt/xwing/config/airsonic2"
container_path = "/config"
},
{
host_path = "/mnt/xwing/media/Music"
container_path = "/music"
},
{
host_path = "/mnt/xwing/config/airsonic/playlists"
container_path = "/playlists"
},
{
host_path = "/mnt/xwing/config/airsonic/podcasts"
container_path = "/podcasts"
},
{
host_path = "/mnt/xwing/config/airsonic/jre"
container_path = "/usr/lib/jvm/java-1.8-openjdk/jre/lib/"
},
]
}
# volumes = [
# {
# host_path = "/mnt/xwing/config/airsonic2"
# container_path = "/config"
# },
# {
# host_path = "/mnt/xwing/media/Music"
# container_path = "/music"
# },
# {
# host_path = "/mnt/xwing/config/airsonic/playlists"
# container_path = "/playlists"
# },
# {
# host_path = "/mnt/xwing/config/airsonic/podcasts"
# container_path = "/podcasts"
# },
# {
# host_path = "/mnt/xwing/config/airsonic/jre"
# container_path = "/usr/lib/jvm/java-1.8-openjdk/jre/lib/"
# },
# ]
# }
# data "template_file" "airsonic-properties-file" {
# template = "${file("${path.module}/conf/airsonic.properties.tpl")}"

68
media/bazarr.tf

@ -1,39 +1,39 @@
module "bazarr-container" {
name = "bazarr"
source = "../modules/container"
image = "linuxserver/bazarr:latest"
# module "bazarr-container" {
# name = "bazarr"
# source = "../modules/container"
# image = "linuxserver/bazarr:latest"
web {
expose = true
port = 6767
host = "bazarr.${var.domain}"
}
# web {
# expose = true
# port = 6767
# host = "bazarr.${var.domain}"
# }
resource {
memory = 512
memory_swap = 1024
}
# resource {
# memory = 512
# memory_swap = 1024
# }
volumes = [
{
host_path = "/mnt/xwing/config/bazarr"
container_path = "/config"
},
{
host_path = "/mnt/xwing/media/TV"
container_path = "/tv"
},
{
host_path = "/mnt/xwing/media/Movies"
container_path = "/movies"
},
]
# volumes = [
# {
# host_path = "/mnt/xwing/config/bazarr"
# container_path = "/config"
# },
# {
# host_path = "/mnt/xwing/media/TV"
# container_path = "/tv"
# },
# {
# host_path = "/mnt/xwing/media/Movies"
# container_path = "/movies"
# },
# ]
env = [
"PUID=1004",
"PGID=1003",
"TZ=Asia/Kolkata",
]
# env = [
# "PUID=1004",
# "PGID=1003",
# "TZ=Asia/Kolkata",
# ]
networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
}
# networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
# }

60
media/gonic.tf

@ -1,34 +1,36 @@
module "gonic" {
source = "../modules/container"
image = "sentriz/gonic"
name = "gonic"
# module "gonic" {
# source = "../modules/container"
# image = "sentriz/gonic"
# name = "gonic"
resource {
memory = "256"
memory_swap = "256"
}
# resource {
# memory = "256"
# memory_swap = "256"
# }
web {
port = 80
host = "gonic.bb8.fun"
expose = true
}
# web {
# port = 80
# host = "gonic.bb8.fun"
# expose = true
# }
env = [
"GONIC_SCAN_INTERVAL=60"
]
# env = [
# "GONIC_SCAN_INTERVAL=60",
# "GONIC_MUSIC_PATH=/music",
# "GONIC_DB_PATH=/data/gonic.db"
# ]
networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
# networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
volumes = [
{
host_path = "/mnt/xwing/config/gonic"
container_path = "/data"
},
{
host_path = "/mnt/xwing/media/Music"
container_path = "/music"
read_only = true
}
]
}
# volumes = [
# {
# host_path = "/mnt/xwing/config/gonic"
# container_path = "/data"
# },
# {
# host_path = "/mnt/xwing/media/Music"
# container_path = "/music"
# read_only = true
# }
# ]
# }

48
media/jellyfin.tf

@ -1,47 +1 @@
resource "docker_container" "jellyfin" {
name = "jellyfin"
image = "${docker_image.jellyfin.latest}"
volumes {
host_path = "/mnt/xwing/config/jellyfin"
container_path = "/config"
}
volumes {
host_path = "/mnt/xwing/media"
container_path = "/media"
}
labels = "${merge(
var.traefik-labels,
map(
"traefik.frontend.rule", "Host:media.in.${var.domain},media.${var.domain}",
"traefik.frontend.passHostHeader", "true",
"traefik.port", 8096,
))}"
networks = ["${docker_network.media.id}", "${var.traefik-network-id}"]
memory = 2048
restart = "unless-stopped"
destroy_grace_seconds = 10
must_run = true
# Running as lounge:tatooine
env = [
"APP_USER=lounge",
"APP_UID=1004",
"APP_GID=1003",
"APP_CONFIG=/mnt/xwing/config",
"TZ=Asia/Kolkata",
]
}
resource "docker_image" "jellyfin" {
name = "${data.docker_registry_image.jellyfin.name}"
pull_triggers = ["${data.docker_registry_image.jellyfin.sha256_digest}"]
}
data "docker_registry_image" "jellyfin" {
name = "jellyfin/jellyfin:latest"
}
#

62
media/mylar.tf

@ -1,35 +1,35 @@
module "mylar" {
name = "mylar"
source = "../modules/container"
image = "linuxserver/mylar:latest"
# module "mylar" {
# name = "mylar"
# source = "../modules/container"
# image = "linuxserver/mylar:latest"
web {
expose = true
port = 8090
host = "mylar.${var.domain}"
auth = true
}
# web {
# expose = true
# port = 8090
# host = "mylar.${var.domain}"
# auth = true
# }
volumes = [
{
host_path = "/mnt/xwing/media/EBooks/Comics"
container_path = "/comics"
},
{
host_path = "/mnt/xwing/config/mylar"
container_path = "/config"
},
{
host_path = "/mnt/xwing/media/DL"
container_path = "/downloads"
},
]
# volumes = [
# {
# host_path = "/mnt/xwing/media/EBooks/Comics"
# container_path = "/comics"
# },
# {
# host_path = "/mnt/xwing/config/mylar"
# container_path = "/config"
# },
# {
# host_path = "/mnt/xwing/media/DL"
# container_path = "/downloads"
# },
# ]
env = [
"PUID=1004",
"PGID=1003",
"TZ=Asia/Kolkata",
]
# env = [
# "PUID=1004",
# "PGID=1003",
# "TZ=Asia/Kolkata",
# ]
networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
}
# networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
# }

6
monitoring/config/prometheus.yml

@ -14,12 +14,12 @@ scrape_configs:
- targets: ["nodeexporter:9100"]
- job_name: "cadvisor"
scrape_interval: 5s
scrape_interval: 1m
static_configs:
- targets: ["cadvisor:8080"]
- job_name: "speedtest"
scrape_interval: 15m
scrape_interval: 1h
scrape_timeout: 2m
static_configs:
- targets: ["speedtest:9696"]
@ -35,7 +35,7 @@ scrape_configs:
- targets: ["192.168.1.111:1111"]
- job_name: "act"
scrape_interval: 15m
scrape_interval: 1h
scrape_timeout: 1m
static_configs:
- targets: ["act-exporter:3000"]

2
rss-bridge.tf

@ -2,7 +2,7 @@ module "rss-bridge" {
name = "rss-bridge"
source = "modules/container"
image = "rssbridge/rss-bridge:latest"
image = "captn3m0/rss-bridge:develop"
resource {
memory = 256

10
stringer.tf

@ -1,8 +1,8 @@
module "stringer-db" {
source = "modules/postgres"
name = "stringer"
password = "${data.pass_password.stringer-db-password.password}"
}
# module "stringer-db" {
# source = "modules/postgres"
# name = "stringer"
# password = "${data.pass_password.stringer-db-password.password}"
# }
# module "stringer-container" {
# name = "stringer"

2
variables.tf

@ -22,7 +22,7 @@ variable "traefik-common-labels" {
"traefik.frontend.headers.STSIncludeSubdomains" = "false"
// X-Powered-By, Server headers
"traefik.frontend.headers.customResponseHeaders" = "X-Powered-By:Allomancy||X-Server:Blackbox"
"traefik.frontend.headers.customResponseHeaders" = "X-Powered-By:Allomancy||X-Server:Blackbox||X-Clacks-Overhead:GNU Terry Pratchett"
// X-Frame-Options
"traefik.frontend.headers.customFrameOptionsValue" = "ALLOW-FROM https://bb8.fun/"

Loading…
Cancel
Save