Skip to content

Commit 1fb77e8

Browse files
committed
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.
1 parent f78d434 commit 1fb77e8

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

pkgs/servers/web-apps/discourse/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ let
266266

267267
# Make sure the notification email setting applies
268268
./notification_email.patch
269+
270+
# Change the path to the public directory reported by Discourse
271+
# to its real path instead of the symlink in the store, since
272+
# the store path won't be matched by any nginx rules
273+
./public_dir_path.patch
269274
];
270275

271276
postPatch = ''
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/lib/file_store/local_store.rb b/lib/file_store/local_store.rb
2+
index 25649532c0..614e062dc1 100644
3+
--- a/lib/file_store/local_store.rb
4+
+++ b/lib/file_store/local_store.rb
5+
@@ -88,7 +88,7 @@ module FileStore
6+
end
7+
8+
def public_dir
9+
- File.join(Rails.root, "public")
10+
+ "/run/discourse/public"
11+
end
12+
13+
def tombstone_dir

0 commit comments

Comments
 (0)