Revert "lychee moved to container module"
This reverts commit 2fb18878ca
.
This commit is contained in:
parent
c57b4b2c72
commit
7d7ea22b31
|
@ -11,3 +11,7 @@ data "docker_registry_image" "wikijs" {
|
||||||
data "docker_registry_image" "ubooquity" {
|
data "docker_registry_image" "ubooquity" {
|
||||||
name = "linuxserver/ubooquity:latest"
|
name = "linuxserver/ubooquity:latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data "docker_registry_image" "lychee" {
|
||||||
|
name = "linuxserver/lychee:latest"
|
||||||
|
}
|
||||||
|
|
|
@ -12,3 +12,8 @@ resource "docker_image" "ubooquity" {
|
||||||
name = "${data.docker_registry_image.ubooquity.name}"
|
name = "${data.docker_registry_image.ubooquity.name}"
|
||||||
pull_triggers = ["${data.docker_registry_image.ubooquity.sha256_digest}"]
|
pull_triggers = ["${data.docker_registry_image.ubooquity.sha256_digest}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "docker_image" "lychee" {
|
||||||
|
name = "${data.docker_registry_image.lychee.name}"
|
||||||
|
pull_triggers = ["${data.docker_registry_image.lychee.sha256_digest}"]
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
upload {
|
||||||
|
content = "${file("${path.module}/conf/lychee.php.ini")}"
|
||||||
|
file = "/config/lychee/user.ini"
|
||||||
|
}
|
||||||
|
|
||||||
|
labels = "${merge(
|
||||||
|
local.traefik_common_labels,
|
||||||
|
map(
|
||||||
|
"traefik.port", 80,
|
||||||
|
"traefik.frontend.rule", "Host:pics.${var.domain}",
|
||||||
|
))}"
|
||||||
|
|
||||||
|
env = [
|
||||||
|
"PUID=986",
|
||||||
|
"PGID=984",
|
||||||
|
]
|
||||||
|
|
||||||
|
# links = ["${var.links-mariadb}"]
|
||||||
|
}
|
|
@ -1,3 +1,7 @@
|
||||||
|
output "lychee-ip" {
|
||||||
|
value = "${docker_container.lychee.ip_address}"
|
||||||
|
}
|
||||||
|
|
||||||
output "names-traefik" {
|
output "names-traefik" {
|
||||||
value = "${docker_container.traefik.name}"
|
value = "${docker_container.traefik.name}"
|
||||||
}
|
}
|
||||||
|
|
29
lychee.tf
29
lychee.tf
|
@ -1,29 +0,0 @@
|
||||||
module "lychee" {
|
|
||||||
source = "modules/container"
|
|
||||||
name = "lychee"
|
|
||||||
image = "linuxserver/lychee:latest"
|
|
||||||
|
|
||||||
volumes = [{
|
|
||||||
host_path = "/mnt/xwing/config/lychee"
|
|
||||||
container_path = "/config"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
host_path = "/mnt/xwing/data/lychee"
|
|
||||||
container_path = "/pictures"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
files = "/config/lychee/user.ini"
|
|
||||||
|
|
||||||
contents = ["${file("${path.module}/docker/conf/lychee.php.ini")}"]
|
|
||||||
|
|
||||||
web {
|
|
||||||
expose = true
|
|
||||||
host = "pics.bb8.fun"
|
|
||||||
}
|
|
||||||
|
|
||||||
env = [
|
|
||||||
"PUID=986",
|
|
||||||
"PGID=984",
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in New Issue