Make mastodon-opt owned by mastodon

This commit is contained in:
niten 2023-08-03 13:11:04 -07:00
parent 2f243f97e4
commit 5d1e4acc41

View File

@ -249,9 +249,10 @@ in {
}; };
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d ${cfg.state-directory}/mastodon 0700 mastodon root - -" "d ${cfg.state-directory}/mastodon-opt 0700 mastodon root - -"
"d ${cfg.state-directory}/postgres 0700 mastodon-postgres root - -" "d ${cfg.state-directory}/mastodon 0700 mastodon root - -"
"d ${cfg.state-directory}/redis 0700 mastodon-redis root - -" "d ${cfg.state-directory}/postgres 0700 mastodon-postgres root - -"
"d ${cfg.state-directory}/redis 0700 mastodon-redis root - -"
]; ];
virtualisation.arion.projects.mastodon.settings = let virtualisation.arion.projects.mastodon.settings = let
@ -302,14 +303,14 @@ in {
"${cfg.state-directory}/mastodon:/mastodon/public/system" "${cfg.state-directory}/mastodon:/mastodon/public/system"
"${cfg.state-directory}/mastodon-opt:/opt" "${cfg.state-directory}/mastodon-opt:/opt"
]; ];
# Keep the container running so we can pop in and migrate
command = ''bash -c "while :; do 'hit ctrl-c!'; sleep 1; done"''; # command = ''bash -c "while :; do 'hit ctrl-c!'; sleep 1; done"'';
# 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 = [
# "CMD-SHELL" "CMD-SHELL"
# "wget -q --spider --proxy=off localhost:3000/health || exit 1" "wget -q --spider --proxy=off localhost:3000/health || exit 1"
# ]; ];
depends_on = [ "postgres" "redis" ]; depends_on = [ "postgres" "redis" ];
networks = [ "internal_network" ]; networks = [ "internal_network" ];
user = mkUserMap cfg.uids.mastodon; user = mkUserMap cfg.uids.mastodon;