From e14e931f0efe62e289d6c606d090e2c44c222a65 Mon Sep 17 00:00:00 2001 From: niten Date: Thu, 27 Jul 2023 10:42:51 -0700 Subject: [PATCH] Pretty sure we don't need 'trust' as auth? --- mastodon-container.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mastodon-container.nix b/mastodon-container.nix index 7cd807c..4136c64 100644 --- a/mastodon-container.nix +++ b/mastodon-container.nix @@ -179,17 +179,17 @@ in { mastodon = mkOption { type = int; description = "UID as which to run Mastodon."; - default = 730; + default = 991; }; postgres = mkOption { type = int; description = "UID as which to run PostgreSQL."; - default = 731; + default = 992; }; redis = mkOption { type = int; description = "UID as which to run Redis."; - default = 732; + default = 993; }; }; }; @@ -231,7 +231,6 @@ in { }; mastodonPostgresEnv = { source-file = makeEnvFile { - DB_HOST = "/var/run/postgresql"; POSTGRES_USER = "mastodon"; POSTGRES_PASSWORD = databasePasswd; POSTGRES_DB = "mastodon"; @@ -278,7 +277,7 @@ in { volumes = [ "${cfg.state-directory}/postgres:/var/lib/postgresql/data" ]; healthcheck.test = [ "CMD" "pg_isready" "-U" "postgres" ]; - environment.POSTGRES_HOST_AUTH_METHOD = "trust"; + # environment.POSTGRES_HOST_AUTH_METHOD = "trust"; networks = [ "internal_network" ]; user = mkUserMap cfg.uids.postgres; env_file = [ @@ -299,8 +298,10 @@ in { image = cfg.images.mastodon; hostname = "mastodon-web"; restart = "always"; - volumes = - [ "${cfg.state-directory}/mastodon:/mastodon/public/system" ]; + volumes = [ + "${cfg.state-directory}/mastodon:/mastodon/public/system" + "${cfg.state-directory}/mastodon-opt:/opt" + ]; command = '' bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"''; healthcheck.test = [