Some minor updates for Docker provider upgrade
This commit is contained in:
parent
1b61a07c55
commit
d1d3506e7b
|
@ -6,3 +6,4 @@
|
|||
*.out
|
||||
*.backup
|
||||
secrets
|
||||
k8s/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
data "docker_registry_image" "traefik" {
|
||||
# Critical and I like upgrading it
|
||||
# for updating config for new features
|
||||
name = "traefik:1.7-alpine"
|
||||
name = "traefik:1.7"
|
||||
}
|
||||
|
||||
data "docker_registry_image" "wikijs" {
|
||||
|
|
|
@ -87,6 +87,7 @@ resource "docker_container" "traefik" {
|
|||
// https://github.com/terraform-providers/terraform-provider-docker/issues/10
|
||||
networks = [
|
||||
"${docker_network.traefik.id}",
|
||||
"${data.docker_network.bridge.id}",
|
||||
]
|
||||
|
||||
env = [
|
||||
|
@ -94,3 +95,7 @@ resource "docker_container" "traefik" {
|
|||
"CLOUDFLARE_API_KEY=${var.cloudflare_key}",
|
||||
]
|
||||
}
|
||||
|
||||
data "docker_network" "bridge" {
|
||||
name = "bridge"
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ locals {
|
|||
|
||||
web {
|
||||
"traefik.port" = "${lookup(var.web, "port", "80")}"
|
||||
"traefik.frontend.rule" = "Host:${lookup(var.web, "host")}"
|
||||
"traefik.frontend.rule" = "Host:${lookup(var.web, "host", "example.invalid")}"
|
||||
"traefik.protocol" = "${lookup(var.web, "protocol", "http")}"
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ resource "docker_container" "container" {
|
|||
|
||||
// Only attach the traefik network if
|
||||
// service is exposed to the web
|
||||
networks = ["${concat(var.networks,split(",",lookup(var.web, "expose", "false") == "false" ? "" :"${data.docker_network.traefik.id}"))}"]
|
||||
networks = ["${concat(var.networks,compact(split(",",lookup(var.web, "expose", "false") == "false" ? "" :"${data.docker_network.traefik.id}")))}"]
|
||||
|
||||
memory = "${local.resource["memory"]}"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ module "opml" {
|
|||
|
||||
web {
|
||||
expose = true
|
||||
host = "opml.${var.domain}"
|
||||
host = "${var.domain}"
|
||||
}
|
||||
|
||||
env = [
|
||||
|
|
|
@ -7,7 +7,6 @@ module "redis" {
|
|||
# ThisSucks
|
||||
web {
|
||||
expose = "false"
|
||||
host = ""
|
||||
}
|
||||
|
||||
resource {
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
module "pulse-pshtt" {
|
||||
name = "pulse-pshtt"
|
||||
source = "modules/container"
|
||||
image = "dhsncats/pshtt:0.5.2"
|
||||
|
||||
volumes = [
|
||||
{
|
||||
host_path = "/mnt/xwing/data/pulse"
|
||||
container_path = "/home/pshtt"
|
||||
},
|
||||
]
|
||||
|
||||
web {
|
||||
expose = false
|
||||
host = ""
|
||||
}
|
||||
|
||||
command = ["--debug", "--timeout=3", "--cache-third-parties=./cache", "domains.csv"]
|
||||
must_run = "false"
|
||||
restart = "no"
|
||||
|
||||
# nameserver = "192.168.1.1"
|
||||
networks = ["bridge"]
|
||||
|
||||
resource = {
|
||||
memory = 2048
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue