diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-21 11:24:17 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-21 12:28:23 +0100 |
commit | d65bf723f3f4548228c24337483286f6c79799cf (patch) | |
tree | 8bc4784fd900ca00064e96d694e3a5fab429cd7e /virtual | |
parent | aebd817b115c1a26a4ec70e5cab9af55ea2c1294 (diff) | |
download | Nix-d65bf723f3f4548228c24337483286f6c79799cf.tar.gz Nix-d65bf723f3f4548228c24337483286f6c79799cf.tar.zst Nix-d65bf723f3f4548228c24337483286f6c79799cf.zip |
Fix some errors (service timouts and mastodon missing paths) after first reboot
Diffstat (limited to 'virtual')
-rw-r--r-- | virtual/modules/websites/tools/mastodon/default.nix | 5 | ||||
-rw-r--r-- | virtual/modules/websites/tools/mastodon/mastodon.nix | 1 | ||||
-rw-r--r-- | virtual/modules/websites/tools/mediagoblin/default.nix | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/virtual/modules/websites/tools/mastodon/default.nix b/virtual/modules/websites/tools/mastodon/default.nix index b2170b5..d25a072 100644 --- a/virtual/modules/websites/tools/mastodon/default.nix +++ b/virtual/modules/websites/tools/mastodon/default.nix | |||
@@ -88,7 +88,7 @@ in { | |||
88 | EnvironmentFile = mastodon.config; | 88 | EnvironmentFile = mastodon.config; |
89 | PrivateTmp = true; | 89 | PrivateTmp = true; |
90 | Restart = "always"; | 90 | Restart = "always"; |
91 | TimeoutSec = 15; | 91 | TimeoutSec = 60; |
92 | Type = "simple"; | 92 | Type = "simple"; |
93 | WorkingDirectory = mastodon.railsRoot; | 93 | WorkingDirectory = mastodon.railsRoot; |
94 | }; | 94 | }; |
@@ -96,6 +96,7 @@ in { | |||
96 | unitConfig.RequiresMountsFor = mastodon.varDir; | 96 | unitConfig.RequiresMountsFor = mastodon.varDir; |
97 | }; | 97 | }; |
98 | 98 | ||
99 | # FIXME: monitor jobs | ||
99 | systemd.services.mastodon-sidekiq = { | 100 | systemd.services.mastodon-sidekiq = { |
100 | description = "Mastodon Sidekiq"; | 101 | description = "Mastodon Sidekiq"; |
101 | wantedBy = [ "multi-user.target" ]; | 102 | wantedBy = [ "multi-user.target" ]; |
@@ -104,7 +105,7 @@ in { | |||
104 | environment.RAILS_ENV="production"; | 105 | environment.RAILS_ENV="production"; |
105 | environment.DB_POOL="5"; | 106 | environment.DB_POOL="5"; |
106 | 107 | ||
107 | path = [ pkgs.bundler pkgs.file ]; | 108 | path = [ pkgs.imagemagick pkgs.ffmpeg pkgs.bundler pkgs.file ]; |
108 | 109 | ||
109 | script = '' | 110 | script = '' |
110 | exec bundle exec sidekiq -c 5 -q default -q mailers -q pull -q push | 111 | exec bundle exec sidekiq -c 5 -q default -q mailers -q pull -q push |
diff --git a/virtual/modules/websites/tools/mastodon/mastodon.nix b/virtual/modules/websites/tools/mastodon/mastodon.nix index e948852..9457a13 100644 --- a/virtual/modules/websites/tools/mastodon/mastodon.nix +++ b/virtual/modules/websites/tools/mastodon/mastodon.nix | |||
@@ -2,6 +2,7 @@ | |||
2 | let | 2 | let |
3 | varDir = "/var/lib/mastodon_immae"; | 3 | varDir = "/var/lib/mastodon_immae"; |
4 | socketsDir = "/run/mastodon"; | 4 | socketsDir = "/run/mastodon"; |
5 | # FIXME: use gemsets and nodejs equivalent | ||
5 | mastodon = stdenv.mkDerivation (fetchedGithub ./mastodon.json // rec { | 6 | mastodon = stdenv.mkDerivation (fetchedGithub ./mastodon.json // rec { |
6 | buildPhase = '' | 7 | buildPhase = '' |
7 | export GIT_SSL_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt | 8 | export GIT_SSL_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt |
diff --git a/virtual/modules/websites/tools/mediagoblin/default.nix b/virtual/modules/websites/tools/mediagoblin/default.nix index 4df7e53..388f6b3 100644 --- a/virtual/modules/websites/tools/mediagoblin/default.nix +++ b/virtual/modules/websites/tools/mediagoblin/default.nix | |||
@@ -80,7 +80,7 @@ in { | |||
80 | User = "mediagoblin"; | 80 | User = "mediagoblin"; |
81 | PrivateTmp = true; | 81 | PrivateTmp = true; |
82 | Restart = "always"; | 82 | Restart = "always"; |
83 | TimeoutSec = 15; | 83 | TimeoutSec = 60; |
84 | Type = "simple"; | 84 | Type = "simple"; |
85 | WorkingDirectory = mediagoblin.pythonRoot; | 85 | WorkingDirectory = mediagoblin.pythonRoot; |
86 | PIDFile = "${mediagoblin.socketsDir}/mediagoblin-celeryd.pid"; | 86 | PIDFile = "${mediagoblin.socketsDir}/mediagoblin-celeryd.pid"; |