nebula/media/airsonic.tf

65 lines
1.4 KiB
Terraform
Raw Normal View History

2018-09-16 06:53:11 +00:00
module "airsonic" {
source = "../modules/container"
image = "linuxserver/airsonic:latest"
name = "airsonic"
2018-02-17 23:34:09 +00:00
2018-09-16 06:53:11 +00:00
resource {
memory = "256"
2018-02-17 23:34:09 +00:00
}
2018-09-16 06:53:11 +00:00
web {
port = 4040
host = "airsonic.bb8.fun"
expose = true
2018-02-17 23:34:09 +00:00
}
2018-09-16 06:53:11 +00:00
user = "lounge:audio"
2018-02-17 23:34:09 +00:00
env = [
"PUID=1004",
"PGID=1003",
"TZ=Asia/Kolkata",
2018-06-13 02:51:31 +00:00
"JAVA_OPTS=-Xmx512m -Dserver.use-forward-headers=true -Dserver.context-path=/",
2018-02-17 23:34:09 +00:00
]
2018-09-16 06:53:11 +00:00
uploads = [
{
file = "/usr/lib/jvm/java-1.8-openjdk/jre/lib/airsonic.properties"
content = "${data.template_file.airsonic-properties-file.rendered}"
},
{
file = "/usr/lib/jvm/java-1.8-openjdk/jre/lib/sound.properties"
content = "${file("${path.module}/conf/airsonic.sound.properties")}"
},
]
2018-02-17 23:34:09 +00:00
2018-09-16 06:53:11 +00:00
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"
},
]
2018-02-17 23:34:09 +00:00
}
data "template_file" "airsonic-properties-file" {
template = "${file("${path.module}/conf/airsonic.properties.tpl")}"
vars {
smtp-password = "${var.airsonic-smtp-password}"
2018-06-13 02:51:31 +00:00
# db-password = "${var.airsonic-db-password}"
2018-02-17 23:34:09 +00:00
}
}