🏡 index : github.com/captn3m0/nebula.git

author Nemo <me@captnemo.in> 2019-06-23 20:55:44.0 +05:30:00
committer Nemo <me@captnemo.in> 2019-06-23 22:37:56.0 +05:30:00
commit
125f4cecafd8aadf625e7b9099e471e2d307f2cb [patch]
tree
956f9e947765cd3919af4375f791bf8e69286961
parent
273b75841c9678286faa75e4343fef233015c483
download
125f4cecafd8aadf625e7b9099e471e2d307f2cb.tar.gz

Adds stringer

- Doesn't work yet, have create an issue

Diff

 secrets.tf  |  8 ++++++++
 stringer.tf | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/secrets.tf b/secrets.tf
index 7511d6d..96e4a1a 100644
--- a/secrets.tf
+++ a/secrets.tf
@@ -131,3 +131,11 @@
data "pass_password" "web_password" {

  path = "web_password"
}

data "pass_password" "stringer-db-password" {

  path = "stringer-db-password"
}

data "pass_password" "stringer-secret-token" {

  path = "stringer-secret-token"
}
diff --git a/stringer.tf b/stringer.tf
new file mode 100644
index 0000000..b61f4d2 100644
--- /dev/null
+++ a/stringer.tf
@@ -1,0 +1,36 @@
module "stringer-db" {

  source   = "modules/postgres"
  name     = "stringer"
  password = "${data.pass_password.stringer-db-password.password}"
}

module "stringer-container" {

  name   = "stringer"
  source = "modules/container"
  image  = "mdswanson/stringer"

  resource {

    memory      = 256
    memory_swap = 256
  }

  web {

    expose = true
    port   = 8080
    host   = "stringer.bb8.fun"
  }

  networks = "${list(

    data.docker_network.bridge.id,
    module.docker.traefik-network-id,
    module.db.postgres-network-id
  )}"

  env = [

    # "DATABASE_URL=postgres://stringer:${data.pass_password.stringer-db-password.password}@postgres:5432/stringer",
    "DATABASE_URL=sqlite3:':memory:'",

    "SECRET_TOKEN=${data.pass_password.stringer-secret-token.password}",
    "RACK_ENV=development",
  ]
}