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

author Nemo <commits@captnemo.in> 2023-07-10 17:01:50.0 +05:30:00
committer Nemo <commits@captnemo.in> 2023-07-10 17:01:50.0 +05:30:00
commit
9e8c5710f2b504d44d91bcb409b239da433b5cd0 [patch]
tree
fe33c1aaabd654e8734726d9d6bc212eb5a3aa36
parent
e4858d5d053f8332c7c2672de3bbbcc315dcb02a
download
9e8c5710f2b504d44d91bcb409b239da433b5cd0.tar.gz

upgrade mastodon and use persistent redis



Diff

 mastodon/db.tf     | 11 +++++++++++
 mastodon/locals.tf |  2 +-
 mastodon/main.tf   |  8 +++++---
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/mastodon/db.tf b/mastodon/db.tf
index 0b326e7..8bc0cc8 100644
--- a/mastodon/db.tf
+++ a/mastodon/db.tf
@@ -9,6 +9,17 @@
    memory      = 256
    memory_swap = 256
  }

  # In case the cache dies,
  # tootctl feeds build
  # regenerates the feeds, run it from
  # inside a mastodon container
  volumes = [

    {
      host_path      = "/mnt/zwing/cache/mastodon-redis"
      container_path = "/data"
    }
  ]
}

module "mastodon-db" {

diff --git a/mastodon/locals.tf b/mastodon/locals.tf
index 8ab26cf..c2806ab 100644
--- a/mastodon/locals.tf
+++ a/mastodon/locals.tf
@@ -1,5 +1,5 @@
locals {

  version = "4.1.2"
  version = "4.1.4"
  env = [

    "LOCAL_DOMAIN=tatooine.club",
    "REDIS_HOST=mastodon-redis",
diff --git a/mastodon/main.tf b/mastodon/main.tf
index cf9af0a..b4e6e82 100644
--- a/mastodon/main.tf
+++ a/mastodon/main.tf
@@ -1,7 +1,7 @@
module "mastodon-web" {

  name   = "mastodon-web"
  source = "../modules/container"
  image  = "tootsuite/mastodon:v${local.version}"
  image  = "ghcr.io/mastodon/mastodon:v${local.version}"
  keep_image = true

  networks = ["mastodon", "traefik", "external", "postgres"]
@@ -44,8 +44,9 @@
module "mastodon-streaming" {

  name   = "mastodon-streaming"
  source = "../modules/container"
  image  = "tootsuite/mastodon:v${local.version}"
  image  = "ghcr.io/mastodon/mastodon:v${local.version}"
  keep_image = true

  # 24 threads for Streaming
  env = concat(local.env,[

    "DB_POOL=8",
@@ -68,12 +69,11 @@
    memory_swap = 512
  }
}


module "mastodon-sidekiq" {

  name   = "mastodon-sidekiq"
  source = "../modules/container"
  image  = "tootsuite/mastodon:v${local.version}"
  image  = "ghcr.io/mastodon/mastodon:v${local.version}"
  keep_image = true
  env = concat(local.env,[

    "DB_POOL=50"