2017-12-28 15:20:21 +00:00
|
|
|
resource "docker_container" "lychee" {
|
|
|
|
name = "lychee"
|
|
|
|
image = "${docker_image.lychee.latest}"
|
|
|
|
|
|
|
|
restart = "unless-stopped"
|
|
|
|
destroy_grace_seconds = 10
|
|
|
|
must_run = true
|
|
|
|
|
|
|
|
volumes {
|
|
|
|
host_path = "/mnt/xwing/config/lychee"
|
|
|
|
container_path = "/config"
|
|
|
|
}
|
|
|
|
|
|
|
|
volumes {
|
|
|
|
host_path = "/mnt/xwing/data/lychee"
|
|
|
|
container_path = "/pictures"
|
|
|
|
}
|
|
|
|
|
2017-12-30 17:46:30 +00:00
|
|
|
upload {
|
|
|
|
content = "${file("${path.module}/conf/lychee.php.ini")}"
|
|
|
|
file = "/config/lychee/user.ini"
|
|
|
|
}
|
|
|
|
|
2018-02-06 19:45:41 +00:00
|
|
|
labels = "${merge(
|
2018-02-06 19:48:32 +00:00
|
|
|
local.traefik_common_labels,
|
|
|
|
map(
|
2018-02-06 19:45:41 +00:00
|
|
|
"traefik.port", 80,
|
2018-02-27 19:52:44 +00:00
|
|
|
"traefik.frontend.rule", "Host:pics.${var.domain}",
|
2018-02-06 19:45:41 +00:00
|
|
|
))}"
|
2017-12-28 15:20:21 +00:00
|
|
|
|
|
|
|
env = [
|
|
|
|
"PUID=986",
|
|
|
|
"PGID=984",
|
|
|
|
]
|
2017-12-28 16:22:11 +00:00
|
|
|
|
2018-06-04 08:09:55 +00:00
|
|
|
# links = ["${var.links-mariadb}"]
|
2017-12-28 15:20:21 +00:00
|
|
|
}
|