From 071a16dc9413c3974d29158d9b896e4c18880f2b Mon Sep 17 00:00:00 2001 From: Nemo Date: Tue, 16 Apr 2019 00:38:40 +0530 Subject: [PATCH] Improve NextCloud Networking --- miniflux.tf | 2 +- nextcloud.tf | 36 ++++++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/miniflux.tf b/miniflux.tf index f95edee..beae524 100644 --- a/miniflux.tf +++ b/miniflux.tf @@ -1,7 +1,7 @@ module "miniflux-container" { name = "miniflux" source = "modules/container" - image = "miniflux/miniflux:2.0.14" + image = "miniflux/miniflux:2.0.15" web { expose = true diff --git a/nextcloud.tf b/nextcloud.tf index 75381a8..f31442f 100644 --- a/nextcloud.tf +++ b/nextcloud.tf @@ -7,7 +7,7 @@ module "nextcloud-db" { module "nextcloud-container" { source = "modules/container" name = "nextcloud" - image = "nextcloud:15-apache" + image = "nextcloud:16-rc-apache" volumes = [{ container_path = "/var/www/html" @@ -35,18 +35,34 @@ module "nextcloud-container" { host = "c.${var.root-domain}" } - # module.docker.traefik-network-id, - networks = "${list( - data.docker_network.bridge.id, - module.db.postgres-network-id - )}" + networks_advanced = [ + { + name = "traefik" + }, + { + name = "nextcloud" + }, + { + name = "postgres" + }, + ] +} + +resource "docker_network" "nextcloud" { + name = "nextcloud" + internal = true } module "nextcloud-redis" { - name = "nextcloud-redis" - source = "modules/container" - image = "redis:alpine" - networks = ["${data.docker_network.bridge.id}"] + name = "nextcloud-redis" + source = "modules/container" + image = "redis:alpine" + + networks_advanced = [ + { + name = "nextcloud" + }, + ] # ThisSucks web {