Adds requestbin

This commit is contained in:
Nemo 2018-05-06 03:16:25 +05:30
parent 99beeb57e3
commit 0c7a43b646
3 changed files with 36 additions and 0 deletions

View File

@ -60,6 +60,12 @@ module "tt-rss" {
traefik-labels = "${var.traefik-common-labels}"
}
module "requestbin" {
source = "requestbin"
domain = "requestbin.bb8.fun"
traefik-labels = "${var.traefik-common-labels}"
}
module "resilio" {
source = "resilio"
domain = "sync.bb8.fun"

23
requestbin/main.tf Normal file
View File

@ -0,0 +1,23 @@
data "docker_registry_image" "requestbin" {
name = "jankysolutions/requestbin:latest"
}
resource "docker_image" "requestbin" {
name = "${data.docker_registry_image.requestbin.name}"
pull_triggers = ["${data.docker_registry_image.requestbin.sha256_digest}"]
}
resource "docker_container" "requestbin" {
name = "requestbin"
image = "${docker_image.requestbin.latest}"
labels = "${merge(
var.traefik-labels, map(
"traefik.port", 8000,
"traefik.frontend.rule","Host:${var.domain}"
))}"
restart = "unless-stopped"
destroy_grace_seconds = 10
must_run = true
}

7
requestbin/variables.tf Normal file
View File

@ -0,0 +1,7 @@
variable "domain" {
type = "string"
}
variable "traefik-labels" {
type = "map"
}