diff options
author | talyz <kim.lindberger@gmail.com> | 2021-10-22 23:38:53 +0200 |
---|---|---|
committer | talyz <kim.lindberger@gmail.com> | 2021-10-22 23:38:53 +0200 |
commit | 1fb77e822b87b0ca729c007e63166c7d2d38e947 (patch) | |
tree | d29e2337208352f22d4be486d63d509b1b67d593 /pkgs/servers/web-apps | |
parent | f78d4347640fde9680d2f8dc3c4c29e9111c9b0c (diff) | |
download | nixpkgs-1fb77e822b87b0ca729c007e63166c7d2d38e947.tar nixpkgs-1fb77e822b87b0ca729c007e63166c7d2d38e947.tar.gz nixpkgs-1fb77e822b87b0ca729c007e63166c7d2d38e947.tar.bz2 nixpkgs-1fb77e822b87b0ca729c007e63166c7d2d38e947.tar.lz nixpkgs-1fb77e822b87b0ca729c007e63166c7d2d38e947.tar.xz nixpkgs-1fb77e822b87b0ca729c007e63166c7d2d38e947.tar.zst nixpkgs-1fb77e822b87b0ca729c007e63166c7d2d38e947.zip |
discourse: Fix the public directory path reported by Discourse
Change the path to the public directory reported by Discourse to its real path instead of the symlink in the store, since the store path won't be matched by any nginx rules. Fixes #142528.
Diffstat (limited to 'pkgs/servers/web-apps')
-rw-r--r-- | pkgs/servers/web-apps/discourse/default.nix | 5 | ||||
-rw-r--r-- | pkgs/servers/web-apps/discourse/public_dir_path.patch | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index 592b981dd77..587cb363fc6 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -266,6 +266,11 @@ let # Make sure the notification email setting applies ./notification_email.patch + + # Change the path to the public directory reported by Discourse + # to its real path instead of the symlink in the store, since + # the store path won't be matched by any nginx rules + ./public_dir_path.patch ]; postPatch = '' diff --git a/pkgs/servers/web-apps/discourse/public_dir_path.patch b/pkgs/servers/web-apps/discourse/public_dir_path.patch new file mode 100644 index 00000000000..0c6579736e2 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/public_dir_path.patch @@ -0,0 +1,13 @@ +diff --git a/lib/file_store/local_store.rb b/lib/file_store/local_store.rb +index 25649532c0..614e062dc1 100644 +--- a/lib/file_store/local_store.rb ++++ b/lib/file_store/local_store.rb +@@ -88,7 +88,7 @@ module FileStore + end + + def public_dir +- File.join(Rails.root, "public") ++ "/run/discourse/public" + end + + def tombstone_dir |