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-11-01 17:00:35 +00:00
|
|
|
# files = [
|
|
|
|
# "/usr/lib/jvm/java-1.8-openjdk/jre/lib/airsonic.properties",
|
|
|
|
# "/usr/lib/jvm/java-1.8-openjdk/jre/lib/sound.properties",
|
|
|
|
# ]
|
2018-10-13 15:25:20 +00:00
|
|
|
|
2018-11-01 17:00:35 +00:00
|
|
|
|
|
|
|
# contents = [
|
|
|
|
# "${data.template_file.airsonic-properties-file.rendered}",
|
|
|
|
# "${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
|
|
|
}
|
|
|
|
}
|