2019-05-12 03:31:46 +00:00
|
|
|
module "elibsrv" {
|
2022-01-08 16:49:38 +00:00
|
|
|
name = "elibsrv"
|
2019-05-12 03:31:46 +00:00
|
|
|
source = "./modules/container"
|
2019-11-03 20:10:18 +00:00
|
|
|
image = "captn3m0/elibsrv"
|
2019-08-01 18:41:25 +00:00
|
|
|
|
2021-10-15 12:54:13 +00:00
|
|
|
resource = {
|
2019-11-03 20:10:18 +00:00
|
|
|
memory = 512
|
|
|
|
memory_swap = 512
|
2019-08-01 18:41:25 +00:00
|
|
|
}
|
2019-05-12 03:31:46 +00:00
|
|
|
|
2021-10-15 12:54:13 +00:00
|
|
|
web = {
|
2019-05-12 03:31:46 +00:00
|
|
|
expose = true
|
|
|
|
host = "ebooks.${var.root-domain}"
|
|
|
|
auth = true
|
|
|
|
}
|
|
|
|
|
|
|
|
volumes = [
|
|
|
|
{
|
|
|
|
host_path = "/mnt/xwing/media/EBooks"
|
|
|
|
container_path = "/books"
|
2019-11-03 20:10:18 +00:00
|
|
|
read_only = true
|
2019-05-12 03:31:46 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
host_path = "/mnt/xwing/config/elibsrv"
|
|
|
|
container_path = "/config"
|
2019-11-03 20:10:18 +00:00
|
|
|
read_only = true
|
2019-05-12 03:31:46 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
host_path = "/mnt/xwing/cache/elibsrv"
|
|
|
|
container_path = "/cache"
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2019-11-03 20:21:56 +00:00
|
|
|
# The corresponding scan command is run using a cronjob
|
|
|
|
# `docker run --volume "/mnt/xwing/media/EBooks:/books:ro" --volume "/mnt/xwing/config/elibsrv:/config" --env "elibsrv_thumbheight=320" captn3m0/elibsrv scan
|
|
|
|
|
|
|
|
command = ["serve"]
|
|
|
|
keep_image = true
|
2019-05-12 03:31:46 +00:00
|
|
|
env = [
|
|
|
|
"elibsrv_thumbheight=320",
|
|
|
|
"elibsrv_title=Scarif Media Archives",
|
|
|
|
]
|
2021-10-15 12:54:13 +00:00
|
|
|
networks = ["bridge"]
|
2019-05-12 03:31:46 +00:00
|
|
|
}
|
2021-10-15 12:54:13 +00:00
|
|
|
|