Move media library service to service template

This commit is contained in:
IamTheFij 2023-03-02 11:01:44 -08:00
parent a70ad9d5a6
commit e0fe3327f0

View File

@ -11,10 +11,6 @@ module "backups" {
# depends_on = [module.databases]
}
module "media" {
source = "./media"
}
resource "nomad_job" "whoami" {
hcl2 {
enabled = true
@ -67,12 +63,29 @@ resource "consul_config_entry" "nzbget_intents" {
})
}
module "media-library" {
source = "./service"
name = "media-library"
image = "caddy"
args = ["caddy", "file-server", "--root", "/mnt/media", "--browse"]
ingress = true
service_port = 80
host_volumes = [
{
name = "media-read"
dest = "/mnt/media"
read_only = true
},
]
}
module "minitor" {
source = "./service"
name = "minitor"
args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"]
image = "iamthefij/minitor-go:1.1"
args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"]
service_port = 8080
metrics_port_name = "main"
healthcheck_path = "/metrics"