Switches to common labels for tt-rss

This commit is contained in:
Nemo 2018-02-06 20:04:44 +05:30
parent 85832d4ad0
commit cae1467588
3 changed files with 10 additions and 11 deletions

View File

@ -39,6 +39,7 @@ module "tt-rss" {
domain = "rss.captnemo.in"
mysql_password = "${var.mysql-ttrss-password}"
links-db = "${module.docker.names-mariadb}"
traefik-labels = "${var.traefik-common-labels}"
}
module "media" {

View File

@ -11,17 +11,11 @@ resource docker_container "tt-rss" {
name = "tt-rss"
image = "${docker_image.tt-rss.latest}"
labels {
"traefik.port" = 80
"traefik.enable" = "true"
"traefik.frontend.headers.SSLTemporaryRedirect" = "true"
"traefik.frontend.headers.STSSeconds" = "2592000"
"traefik.frontend.headers.STSIncludeSubdomains" = "false"
"traefik.frontend.headers.contentTypeNosniff" = "true"
"traefik.frontend.headers.browserXSSFilter" = "true"
"traefik.frontend.passHostHeader" = "true"
"traefik.frontend.rule" = "Host:${var.domain}"
}
labels = "${merge(
var.traefik-labels, map(
"traefik.port", 80,
"traefik.frontend.rule","Host:${var.domain}"
))}"
volumes {
host_path = "/mnt/xwing/config/tt-rss"

View File

@ -4,3 +4,7 @@ variable "domain" {
variable "mysql_password" {}
variable "links-db" {}
variable "traefik-labels" {
type = "map"
}