You go terraform

This commit is contained in:
Nemo 2017-11-08 00:14:30 +05:30
parent 7687eaf935
commit 330184ab08
1 changed files with 31 additions and 28 deletions

View File

@ -77,8 +77,9 @@ resource docker_container "transmission" {
] ]
memory = 512 memory = 512
restart = "unless-stopped"
restart = "on-failure" destroy_grace_seconds = 10
must_run = true
} }
resource "docker_container" "mariadb" { resource "docker_container" "mariadb" {
@ -98,8 +99,9 @@ resource "docker_container" "mariadb" {
} }
memory = 512 memory = 512
restart = "unless-stopped"
restart = "on-failure" destroy_grace_seconds = 10
must_run = true
env = [ env = [
"MYSQL_ROOT_PASSWORD=${var.mysql_root_password}", "MYSQL_ROOT_PASSWORD=${var.mysql_root_password}",
@ -127,8 +129,9 @@ resource "docker_container" "emby" {
} }
memory = 512 memory = 512
restart = "unless-stopped"
restart = "on-failure" destroy_grace_seconds = 10
must_run = true
# Running as lounge:tatooine # Running as lounge:tatooine
env = [ env = [
@ -165,9 +168,10 @@ resource "docker_container" "flexget" {
ip = "0.0.0.0" ip = "0.0.0.0"
} }
memory = 512 memory = 128
restart = "unless-stopped"
restart = "on-failure" destroy_grace_seconds = 10
must_run = true
# Running as lounge:tatooine # Running as lounge:tatooine
env = [ env = [
@ -204,9 +208,10 @@ resource "docker_container" "couchpotato" {
ip = "0.0.0.0" ip = "0.0.0.0"
} }
memory = 512 memory = 128
restart = "unless-stopped"
restart = "on-failure" destroy_grace_seconds = 10
must_run = true
# Running as lounge:tatooine # Running as lounge:tatooine
env = [ env = [
@ -232,26 +237,24 @@ resource "docker_container" "traefik" {
ip = "192.168.1.111" ip = "192.168.1.111"
} }
provisioner "file" { upload {
source = "./docker/conf/traefik.toml" content = <<EOF
destination = "/mnt/xwing/config/traefik/traefik.toml" [web]
address = ":1111"
connection { [docker]
type = "ssh" domain = "docker.in.bb8.fun"
user = "nemo" watch = true
password = "" EOF
host = "192.168.1.111" file = "/etc/traefik/traefik.toml"
timeout = 5
}
}
volumes {
host_path = "/mnt/xwing/config/traefik"
container_path = "/etc/traefik"
} }
volumes { volumes {
host_path = "/var/run/docker.sock" host_path = "/var/run/docker.sock"
container_path = "/var/run/docker.sock" container_path = "/var/run/docker.sock"
} }
memory = 256
restart = "unless-stopped"
destroy_grace_seconds = 10
must_run = true
} }