diff --git a/hosts/mandalore/README.md b/hosts/mandalore/README.md deleted file mode 100644 index be5e2ae..0000000 --- a/hosts/mandalore/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# `mandalore` - -On the `mandalore` server, there are some services: - -+ [Portainer](https://www.portainer.io/): Container management. -+ [FreshRSS](https://freshrss.org/): RSS reader. -+ [Jellyfin](https://jellyfin.org/): Media server. -+ [Nextcloud](https://nextcloud.com/): Cloud storage. -+ Others... - -To install all of them: - -```bash -terraform init -terraform apply -``` - -If you create a file to store the variables: - -```bash -touch mandalore.tfvars -# edit the file -terraform apply -var-file="mandalore.tfvars" -``` diff --git a/hosts/mandalore/main.tf b/hosts/mandalore/main.tf deleted file mode 100644 index 2c90c91..0000000 --- a/hosts/mandalore/main.tf +++ /dev/null @@ -1,13 +0,0 @@ -terraform { - required_providers { - docker = { - source = "kreuzwerker/docker" - version = "3.0.2" - } - } -} - -provider "docker" { - # can be the port in remote connection - host = "unix:///var/run/docker.sock" -} diff --git a/hosts/mandalore/network.tf b/hosts/mandalore/network.tf deleted file mode 100644 index 34ee949..0000000 --- a/hosts/mandalore/network.tf +++ /dev/null @@ -1,9 +0,0 @@ -resource "docker_network" "madalore" { - name = "madalore" - driver = "bridge" -} - -resource "docker_network" "public" { - name = "public" - driver = "bridge" -} diff --git a/hosts/mandalore/variables.tf b/hosts/mandalore/variables.tf deleted file mode 100644 index 96ceb97..0000000 --- a/hosts/mandalore/variables.tf +++ /dev/null @@ -1,13 +0,0 @@ -// Create a `mandalore.tfvars` to store the values of the variables. - -variable "domain_name" { - type = string - default = "rpi.srv" - description = "Domain name for the server" -} - -variable "server_name" { - type = string - default = "madalore" - description = "Name of the server" -} diff --git a/hosts/scariff/media/jackett.tf b/hosts/scariff/media/jackett.tf deleted file mode 100644 index 44f729d..0000000 --- a/hosts/scariff/media/jackett.tf +++ /dev/null @@ -1,57 +0,0 @@ -resource "docker_image" "jackett" { - name = "linuxserver/jackett:latest" -} - -resource "docker_container" "jackett" { - name = "jackett" - image = docker_image.jackett.name - restart = "unless-stopped" - - env = [ - "TZ=Europe/Paris", - "PUID=1000", - "PGID=1000", - ] - - volumes { - host_path = "${var.path_config}/jackett" - container_path = "/config" - } - # volumes { - # host_path = "${var.path_downloads}/jackett" - # container_path = "/downloads" - # } - - labels { - label = "traefik.http.services.jackett.loadbalancer.server.port" - value = "9117" - } - labels { - label = "traefik.http.routers.jackett.rule" - value = "Host(`jackett.${var.domain_name}`)" - } - labels { - label = "traefik.http.routers.jackett.entrypoints" - value = var.entrypoint - } - labels { - label = "traefik.enable" - value = var.traefik_enable - } - labels { - label = "traefik.http.routers.jackett.tls.certresolver" - value = var.resolver_ssl - } - labels { - label = "traefik.http.routers.jackett.tls" - value = var.tls_enable - } - - networks_advanced { - name = var.network - } - - depends_on = [ - docker_image.jackett, - ] -} diff --git a/hosts/scariff/media/jellyfin.tf b/hosts/scariff/media/jellyfin.tf deleted file mode 100644 index a138aee..0000000 --- a/hosts/scariff/media/jellyfin.tf +++ /dev/null @@ -1,69 +0,0 @@ -resource "docker_image" "jellyfin" { - name = "jellyfin/jellyfin:latest" -} - -resource "docker_container" "jellyfin" { - name = "jellyfin" - image = docker_image.jellyfin.name - restart = "unless-stopped" - network_mode = "host" - - volumes { - host_path = "${var.path_config}/jellyfin" - container_path = "/config" - } - - volumes { - host_path = "${var.path_downloads}/movies" - container_path = "/movies" - } - volumes { - host_path = "${var.path_downloads}/series" - container_path = "/series" - } - volumes { - host_path = "${var.path_downloads}/music" - container_path = "/music" - } - volumes { - host_path = "${var.path_downloads}/photos" - container_path = "/photos" - } - volumes { - host_path = "${var.path_downloads}/ytdl" - container_path = "/ytdl" - } - - labels { - label = "traefik.http.services.jellyfin.loadbalancer.server.port" - value = "8096" - } - labels { - label = "traefik.http.routers.jellyfin.rule" - value = "Host(`jellyfin.${var.domain_name}`)" - } - labels { - label = "traefik.http.routers.jellyfin.entrypoints" - value = var.entrypoint - } - labels { - label = "traefik.enable" - value = var.traefik_enable - } - labels { - label = "traefik.http.routers.jellyfin.tls.certresolver" - value = var.resolver_ssl - } - labels { - label = "traefik.http.routers.jellyfin.tls" - value = var.tls_enable - } - - networks_advanced { - name = var.network - } - - depends_on = [ - docker_image.jellyfin - ] -} diff --git a/hosts/scariff/media/jellyseerr.tf b/hosts/scariff/media/jellyseerr.tf deleted file mode 100644 index ca311a6..0000000 --- a/hosts/scariff/media/jellyseerr.tf +++ /dev/null @@ -1,52 +0,0 @@ -resource "docker_image" "jellyseerr" { - name = "fallenbagel/jellyseerr:latest" -} - -resource "docker_container" "jellyseerr" { - name = "jellyseerr" - image = docker_image.jellyseerr.name - restart = "unless-stopped" - - env = [ - "LOG_LEVEL=debug", - "TZ=Europe/Paris", - ] - - volumes { - host_path = "${var.path_config}/jellyseerr" - container_path = "/config" - } - - labels { - label = "traefik.http.services.jellyseerr.loadbalancer.server.port" - value = "5055" - } - labels { - label = "traefik.http.routers.jellyseerr.rule" - value = "Host(`vod.${var.domain_name}`)" - } - labels { - label = "traefik.http.routers.jellyseerr.entrypoints" - value = var.entrypoint - } - labels { - label = "traefik.enable" - value = var.traefik_enable - } - labels { - label = "traefik.http.routers.jellyseerr.tls.certresolver" - value = var.resolver_ssl - } - labels { - label = "traefik.http.routers.jellyseerr.tls" - value = var.tls_enable - } - - network_advanced { - name = var.network - } - - depends_on = [ - docker_image.jellyseerr - ] -} diff --git a/hosts/scariff/media/main.tf b/hosts/scariff/media/main.tf deleted file mode 100644 index 2ccdacc..0000000 --- a/hosts/scariff/media/main.tf +++ /dev/null @@ -1,14 +0,0 @@ -terraform { - required_providers { - docker = { - source = "kreuzwerker/docker" - version = "3.0.2" - } - } -} - -provider "docker" { - # can be the port in remote connection - host = "unix:///var/run/docker.sock" - # host = "tcp://${var.host}:2375" -} diff --git a/hosts/scariff/media/radarr.tf b/hosts/scariff/media/radarr.tf deleted file mode 100644 index d6f70eb..0000000 --- a/hosts/scariff/media/radarr.tf +++ /dev/null @@ -1,62 +0,0 @@ -resource "docker_image" "radarr" { - name = "linuxserver/radarr:latest" -} - -resource "docker_container" "radarr" { - name = "radarr" - image = docker_image.radarr.name - restart = "unless-stopped" - - env = [ - "TZ=Europe/Paris", - "PUID=1000", - "PGID=1000", - ] - - volumes { - host_path = "${var.path_config}/radarr" - container_path = "/config" - } - volumes { - host_path = "${var.path_downloads}/movies" - container_path = "/movies" - } - # volumes { - # host_path = "${var.path_downloads}/downloads" - # container_path = "/downloads" - # } - - labels { - label = "traefik.http.services.radarr.loadbalancer.server.port" - value = "7878" - } - labels { - label = "traefik.http.routers.radarr.rule" - value = "Host(`radarr.${var.domain_name}`)" - } - labels { - label = "traefik.http.routers.radarr.entrypoints" - value = var.entrypoint - } - labels { - label = "traefik.enable" - value = var.traefik_enable - } - labels { - label = "traefik.http.routers.radarr.tls.certresolver" - value = var.resolver_ssl - } - - labels { - label = "traefik.http.routers.radarr.tls" - value = var.tls_enable - } - - networks_advanced { - name = var.network - } - - depends_on = [ - docker_image.radarr, - ] -} diff --git a/hosts/scariff/media/sonarr.tf b/hosts/scariff/media/sonarr.tf deleted file mode 100644 index 813d23e..0000000 --- a/hosts/scariff/media/sonarr.tf +++ /dev/null @@ -1,61 +0,0 @@ -resource "docker_image" "sonarr" { - name = "linuxserver/sonarr:latest" -} - -resource "docker_container" "sonarr" { - name = "sonarr" - image = docker_image.sonarr.name - restart = "unless-stopped" - - env = [ - "TZ=Europe/Paris", - "PUID=1000", - "PGID=1000", - ] - - volumes { - host_path = "${var.path_config}/sonarr" - container_path = "/config" - } - volumes { - host_path = "${var.path_downloads}/series" - container_path = "/tv" - } - # volumes { - # host_path = "${var.path_downloads}/downloads" - # container_path = "/downloads" - # } - - labels { - label = "traefik.http.services.sonarr.loadbalancer.server.port" - value = "8989" - } - labels { - label = "traefik.http.routers.sonarr.rule" - value = "Host(`sonarr.${var.domain_name}`)" - } - labels { - label = "traefik.http.routers.sonarr.entrypoints" - value = var.entrypoint - } - labels { - label = "traefik.enable" - value = var.traefik_enable - } - labels { - label = "traefik.http.routers.sonarr.tls.certresolver" - value = var.resolver_ssl - } - labels { - label = "traefik.http.routers.sonarr.tls" - value = var.tls_enable - } - - networks_advanced { - name = var.network - } - - depends_on = [ - docker_image.sonarr, - ] -} diff --git a/hosts/scariff/media/variables.tf b/hosts/scariff/media/variables.tf deleted file mode 100644 index 76eab13..0000000 --- a/hosts/scariff/media/variables.tf +++ /dev/null @@ -1,44 +0,0 @@ -variable "domain_name" { - type = string - description = "Domain name for the server" -} - -variable "hostname" { - type = string - description = "Name of the server" -} - -variable "path_downloads" { - type = string - description = "Path to the downloads folder" -} - -variable "path_config" { - type = string - description = "Path of the config folder" -} - -variable "resolver_ssl" { - type = string - description = "SSL resolver for Traefik. can be 'staging' or 'production'" -} - -variable "entrypoint" { - type = string - description = "Entrypoint for Traefik. can be 'web' or 'websecure'" -} - -variable "traefik_enable" { - type = bool - description = "Enable Traefik" -} - -variable "tls_enable" { - type = bool - description = "Enable TLS" -} - -variable "network" { - type = string - description = "Name of the Docker network" -} diff --git a/hosts/scariff/not-deployed/code-server.tf b/hosts/scariff/not-deployed/code-server.tf deleted file mode 100644 index 0355420..0000000 --- a/hosts/scariff/not-deployed/code-server.tf +++ /dev/null @@ -1,63 +0,0 @@ -resource "docker_image" "code_server" { - name = "linuxserver/code-server:latest" -} - -resource "docker_container" "code_server" { - name = "code-server" - image = docker_image.code_server.name - restart = "unless-stopped" - env = [ - "PGID=1000", - "PUID=1000" - ] - - ports { - internal = 8443 - external = 8443 - } - - volumes { - container_path = "/config" - host_path = "${var.path_config}/code-server/" - read_only = false - } - volumes { - container_path = "/docker-config" - host_path = var.path_config - read_only = false - } - - labels { - label = "traefik.http.routers.code-server.rule" - value = "Host(`code.${var.domain_name}`)" - } - labels { - label = "traefik.http.routers.code-server.entrypoints" - value = var.entrypoint - } - labels { - label = "traefik.enable" - value = var.traefik_enable - } - labels { - label = "traefik.http.services.code-server.loadbalancer.server.port" - value = "8443" - } - labels { - label = "traefik.http.routers.code-server.tls.certresolver" - value = var.resolver_ssl - } - labels { - label = "traefik.http.routers.code-server.tls" - value = var.tls_enable - } - - networks_advanced { - name = docker_network.main.name - } - - depends_on = [ - docker_image.code_server, - docker_network.main - ] -}