From 5d1e4acc415d0feefa9bd0f4dfd337f8ab24b327 Mon Sep 17 00:00:00 2001 From: niten Date: Thu, 3 Aug 2023 13:11:04 -0700 Subject: [PATCH] Make mastodon-opt owned by mastodon --- mastodon-container.nix | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/mastodon-container.nix b/mastodon-container.nix index 984ccb9..673b9ae 100644 --- a/mastodon-container.nix +++ b/mastodon-container.nix @@ -249,9 +249,10 @@ in { }; systemd.tmpfiles.rules = [ - "d ${cfg.state-directory}/mastodon 0700 mastodon root - -" - "d ${cfg.state-directory}/postgres 0700 mastodon-postgres root - -" - "d ${cfg.state-directory}/redis 0700 mastodon-redis root - -" + "d ${cfg.state-directory}/mastodon-opt 0700 mastodon root - -" + "d ${cfg.state-directory}/mastodon 0700 mastodon 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 @@ -302,14 +303,14 @@ in { "${cfg.state-directory}/mastodon:/mastodon/public/system" "${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 "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"''; - # healthcheck.test = [ - # "CMD-SHELL" - # "wget -q --spider --proxy=off localhost:3000/health || exit 1" - # ]; + + # command = ''bash -c "while :; do 'hit ctrl-c!'; sleep 1; done"''; + command = '' + bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"''; + healthcheck.test = [ + "CMD-SHELL" + "wget -q --spider --proxy=off localhost:3000/health || exit 1" + ]; depends_on = [ "postgres" "redis" ]; networks = [ "internal_network" ]; user = mkUserMap cfg.uids.mastodon;