nebula/media/gonic.tf

75 lines
1.4 KiB
Terraform
Raw Normal View History

2020-10-10 13:32:50 +00:00
module "gonic" {
source = "../modules/container"
image = "sentriz/gonic"
name = "gonic"
2019-12-31 16:23:39 +00:00
2020-10-10 13:32:50 +00:00
resource {
memory = "512"
memory_swap = "512"
}
2019-12-31 16:23:39 +00:00
2020-10-10 13:32:50 +00:00
web {
port = 80
host = "gonic.bb8.fun"
expose = true
}
2019-12-31 16:23:39 +00:00
2020-10-10 13:32:50 +00:00
env = [
"GONIC_SCAN_INTERVAL=60",
"GONIC_MUSIC_PATH=/music",
"GONIC_DB_PATH=/data/gonic.db"
]
2019-12-31 16:23:39 +00:00
2020-10-10 13:32:50 +00:00
networks = "${list(docker_network.media.id, data.docker_network.bridge.id)}"
2019-12-31 16:23:39 +00:00
2020-10-10 13:32:50 +00:00
volumes = [
{
host_path = "/mnt/xwing/config/gonic"
container_path = "/data"
},
{
host_path = "/mnt/xwing/media/Music"
container_path = "/music"
read_only = true
}
]
}
2020-10-11 12:59:56 +00:00
// Run a second instance, just for Audiobooks
module "gonic-audio" {
source = "../modules/container"
image = "sentriz/gonic"
name = "gonic-audio"
resource {
memory = "256"
memory_swap = "256"
}
web {
port = 80
host = "audiobooks.bb8.fun"
expose = true
}
env = [
"GONIC_SCAN_INTERVAL=60",
"GONIC_MUSIC_PATH=/books",
"GONIC_DB_PATH=/data/gonic-audio.db"
]
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/Audiobooks"
container_path = "/books"
read_only = true
}
]
}