Adds klaxon

This commit is contained in:
Nemo 2021-01-27 12:58:32 +05:30
parent c3584a8f56
commit add21ccdac
2 changed files with 57 additions and 0 deletions

46
klaxon.tf Normal file
View File

@ -0,0 +1,46 @@
module "klaxon-db" {
source = "modules/postgres"
name = "klaxon"
password = "${data.pass_password.klaxon-db-password.password}"
}
module "klaxon" {
name = "klaxon"
source = "modules/container"
web {
expose = true
port = "3000"
host = "klaxon.${var.root-domain}"
}
resource {
memory = 1024
memory_swap = 1024
}
env = [
"DATABASE_URL=postgres://klaxon:${data.pass_password.klaxon-db-password.password}@postgres/klaxon",
"ADMIN_EMAILS=klaxon.admin@captnemo.in",
"RAILS_ENV=production",
"SECRET_KEY_BASE=${data.pass_password.klaxon-secret-key.password}",
"SENDGRID_USERNAME=apikey",
"SENDGRID_PASSWORD=${data.pass_password.klaxon-sendgrid-password.password}",
"KLAXON_FORCE_SSL=false",
"KLAXON_COMPILE_ASSETS=true",
"ADMIN_EMAILS=klaxon@captnemo.in",
"MAILER_FROM_ADDRESS=klaxon@sendgrid.captnemo.in"
]
restart = "always"
image = "themarshallproject/klaxon"
networks_advanced = [
{
name = "traefik"
}, {
name = "postgres"
}, {
name = "external"
}]
}

View File

@ -142,3 +142,14 @@ data "pass_password" "stringer-secret-token" {
data "pass_password" "wiki-db-password" { data "pass_password" "wiki-db-password" {
path = "wiki-db-password" path = "wiki-db-password"
} }
data "pass_password" "klaxon-db-password" {
path = "klaxon-db-password"
}
data "pass_password" "klaxon-secret-key" {
path = "klaxon-secret-key"
}
data "pass_password" "klaxon-sendgrid-password" {
path = "klaxon-sendgrid-password"
}