Browse Source

Switches to a single traefik network

- See https://github.com/containous/traefik/issues/3429
- traefik labels are added everywhere now
monicahq
Nemo 2 years ago
parent
commit
453e976d85
5 changed files with 6 additions and 9 deletions
  1. +2
    -0
      docker/locals.tf
  2. +0
    -7
      docker/traefik.tf
  3. +1
    -0
      docker/wiki.tf
  4. +0
    -2
      main.tf
  5. +3
    -0
      variables.tf

+ 2
- 0
docker/locals.tf View File

@ -14,5 +14,7 @@ locals {
"traefik.frontend.headers.customFrameOptionsValue" = "${var.xfo_allow}"
"traefik.frontend.headers.contentTypeNosniff" = "true"
"traefik.frontend.headers.browserXSSFilter" = "true"
"traefik.docker.network" = "traefik"
}
}

+ 0
- 7
docker/traefik.tf View File

@ -95,15 +95,8 @@ resource "docker_container" "traefik" {
// `bridge` is auto-connected for now
// https://github.com/terraform-providers/terraform-provider-docker/issues/10
//
// The extra IDs are till https://github.com/containous/traefik/issues/3429 is resolved
// gitea, media, opml, monitoring
networks = [
"${docker_network.traefik.id}",
"31efc1966139",
"f0d3bbcf75dd",
"aad198ad4ba8",
"021125972c4b",
]
env = [


+ 1
- 0
docker/wiki.tf View File

@ -45,6 +45,7 @@ resource "docker_container" "wiki" {
))}"
networks = [
"${var.networks-mongorocks}",
"${docker_network.traefik.id}",
]
env = [
"WIKI_ADMIN_EMAIL=me@captnemo.in",


+ 0
- 2
main.tf View File

@ -20,8 +20,6 @@ module "docker" {
cloudflare_key = "${var.cloudflare_key}"
cloudflare_email = "bb8@captnemo.in"
wiki_session_secret = "${var.wiki_session_secret}"
# links-mariadb = "${module.db.names-mariadb}"
networks-mongorocks = "${module.db.networks-mongorocks}"
ips = "${var.ips}"
domain = "bb8.fun"


+ 3
- 0
variables.tf View File

@ -67,6 +67,9 @@ variable "traefik-common-labels" {
"traefik.frontend.headers.customFrameOptionsValue" = "ALLOW-FROM https://bb8.fun/"
"traefik.frontend.headers.contentTypeNosniff" = "true"
"traefik.frontend.headers.browserXSSFilter" = "true"
// Use the Traefik network
"traefik.docker.network" = "traefik"
}
}


Loading…
Cancel
Save