Pretty sure we don't need 'trust' as auth?

This commit is contained in:
niten 2023-07-27 10:42:51 -07:00
parent 39e9b4e5f4
commit e14e931f0e

View File

@ -179,17 +179,17 @@ in {
mastodon = mkOption { mastodon = mkOption {
type = int; type = int;
description = "UID as which to run Mastodon."; description = "UID as which to run Mastodon.";
default = 730; default = 991;
}; };
postgres = mkOption { postgres = mkOption {
type = int; type = int;
description = "UID as which to run PostgreSQL."; description = "UID as which to run PostgreSQL.";
default = 731; default = 992;
}; };
redis = mkOption { redis = mkOption {
type = int; type = int;
description = "UID as which to run Redis."; description = "UID as which to run Redis.";
default = 732; default = 993;
}; };
}; };
}; };
@ -231,7 +231,6 @@ in {
}; };
mastodonPostgresEnv = { mastodonPostgresEnv = {
source-file = makeEnvFile { source-file = makeEnvFile {
DB_HOST = "/var/run/postgresql";
POSTGRES_USER = "mastodon"; POSTGRES_USER = "mastodon";
POSTGRES_PASSWORD = databasePasswd; POSTGRES_PASSWORD = databasePasswd;
POSTGRES_DB = "mastodon"; POSTGRES_DB = "mastodon";
@ -278,7 +277,7 @@ in {
volumes = volumes =
[ "${cfg.state-directory}/postgres:/var/lib/postgresql/data" ]; [ "${cfg.state-directory}/postgres:/var/lib/postgresql/data" ];
healthcheck.test = [ "CMD" "pg_isready" "-U" "postgres" ]; healthcheck.test = [ "CMD" "pg_isready" "-U" "postgres" ];
environment.POSTGRES_HOST_AUTH_METHOD = "trust"; # environment.POSTGRES_HOST_AUTH_METHOD = "trust";
networks = [ "internal_network" ]; networks = [ "internal_network" ];
user = mkUserMap cfg.uids.postgres; user = mkUserMap cfg.uids.postgres;
env_file = [ env_file = [
@ -299,8 +298,10 @@ in {
image = cfg.images.mastodon; image = cfg.images.mastodon;
hostname = "mastodon-web"; hostname = "mastodon-web";
restart = "always"; restart = "always";
volumes = volumes = [
[ "${cfg.state-directory}/mastodon:/mastodon/public/system" ]; "${cfg.state-directory}/mastodon:/mastodon/public/system"
"${cfg.state-directory}/mastodon-opt:/opt"
];
command = '' command = ''
bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"''; bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"'';
healthcheck.test = [ healthcheck.test = [