Merge pull request #139180 from ryantm/dev/ryantm/discourse-tmp
discourse: enable restoring backups bigger than RAM
This commit is contained in:
commit
0686c40309
|
@ -746,6 +746,8 @@ in
|
|||
|
||||
umask u=rwx,g=rx,o=
|
||||
|
||||
rm -rf /var/lib/discourse/tmp/*
|
||||
|
||||
cp -r ${cfg.package}/share/discourse/config.dist/* /run/discourse/config/
|
||||
cp -r ${cfg.package}/share/discourse/public.dist/* /run/discourse/public/
|
||||
ln -sf /var/lib/discourse/uploads /run/discourse/public/uploads
|
||||
|
@ -767,7 +769,7 @@ in
|
|||
)
|
||||
|
||||
discourse-rake db:migrate >>/var/log/discourse/db_migration.log
|
||||
chmod -R u+w /run/discourse/tmp/
|
||||
chmod -R u+w /var/lib/discourse/tmp/
|
||||
|
||||
${lib.optionalString (!cfg.admin.skipCreate) mkAdmin}
|
||||
|
||||
|
@ -782,7 +784,6 @@ in
|
|||
RuntimeDirectory = map (p: "discourse/" + p) [
|
||||
"config"
|
||||
"home"
|
||||
"tmp"
|
||||
"assets/javascripts/plugins"
|
||||
"public"
|
||||
"sockets"
|
||||
|
@ -791,6 +792,7 @@ in
|
|||
StateDirectory = map (p: "discourse/" + p) [
|
||||
"uploads"
|
||||
"backups"
|
||||
"tmp"
|
||||
];
|
||||
StateDirectoryMode = 0750;
|
||||
LogsDirectory = "discourse";
|
||||
|
|
|
@ -290,7 +290,7 @@ let
|
|||
cp -r . $out/share/discourse
|
||||
rm -r $out/share/discourse/log
|
||||
ln -sf /var/log/discourse $out/share/discourse/log
|
||||
ln -sf /run/discourse/tmp $out/share/discourse/tmp
|
||||
ln -sf /var/lib/discourse/tmp $out/share/discourse/tmp
|
||||
ln -sf /run/discourse/config $out/share/discourse/config
|
||||
ln -sf /run/discourse/assets/javascripts/plugins $out/share/discourse/app/assets/javascripts/plugins
|
||||
ln -sf /run/discourse/public $out/share/discourse/public
|
||||
|
|
Loading…
Reference in a new issue