From c066e62ee0a5ee1cd3f2cfd2f07dba3f170cc7e9 Mon Sep 17 00:00:00 2001 From: Nemo Date: Thu, 16 May 2019 16:06:26 +0530 Subject: [PATCH] Fix radicale --- gitea/data.tf | 2 +- modules/container/main.tf | 2 + modules/container/vars.tf | 4 ++ radicale/main.tf | 92 ++++++++++++++++++++++++++++++--------- 4 files changed, 79 insertions(+), 21 deletions(-) diff --git a/gitea/data.tf b/gitea/data.tf index 2035345..aa45624 100644 --- a/gitea/data.tf +++ b/gitea/data.tf @@ -1,7 +1,7 @@ # https://github.com/go-gitea/gitea/releases data "docker_registry_image" "gitea" { # not bleeding, this is hemorrhaging edge - name = "gitea/gitea:1.7" + name = "gitea/gitea:1.8" } data "docker_registry_image" "redis" { diff --git a/modules/container/main.tf b/modules/container/main.tf index 6646d42..f65f864 100644 --- a/modules/container/main.tf +++ b/modules/container/main.tf @@ -40,6 +40,8 @@ resource "docker_container" "container" { dns = ["${var.dns}"] + upload = ["${var.uploads}"] + # Look at this monstrosity # And then https://github.com/hashicorp/terraform/issues/12453#issuecomment-365569618 # for why this is needed diff --git a/modules/container/vars.tf b/modules/container/vars.tf index 773f8d9..ac0455f 100644 --- a/modules/container/vars.tf +++ b/modules/container/vars.tf @@ -121,3 +121,7 @@ variable "keep_image" { description = "keep image, don't delete" default = false } + +variable "uploads" { + default = [] +} diff --git a/radicale/main.tf b/radicale/main.tf index cd54c1b..1f6a6c4 100644 --- a/radicale/main.tf +++ b/radicale/main.tf @@ -1,12 +1,7 @@ -module "image" { - source = "../modules/image" - image = "tomsquest/docker-radicale:latest" -} - module "container" { name = "radicale" source = "../modules/container" - image = "${module.image.image}" + image = "tomsquest/docker-radicale:amd64" web { expose = true @@ -25,18 +20,75 @@ module "container" { }, ] - # uploads = [ - # { - # content = "${file("${path.module}/config")}" - # file = "/config/config" - # }, - # { - # content = "${file("${path.module}/logging.conf")}" - # file = "/config/logging" - # }, - # { - # content = "${file("${path.module}/users")}" - # file = "/config/users" - # }, - # ] + uploads = [ + { + content = <