تم تثبيت Discourse بنجاح على Digital Ocean، ويعمل كل شيء بشكل ممتاز، لكننا لا نستطيع بأي حال من الأحوال العثور على ملفات Discourse الفعلية. أردنا تجربة بعض التعديلات وبناء بعض الإضافات، لكننا لم نتمكن من العثور على أي ملفات. استخدمنا Filezilla لتسجيل الدخول إلى الموقع، ومع ذلك، لم نتمكن من العثور على أي من ملفات تطبيق Discourse في أي مكان، مثل discourse/app. دخلنا إلى مجلد var/discourse ولم نجد شيئًا، ثم انتقلنا إلى var/discourse/containers ولم نجد شيئًا أيضًا. قمنا بتسجيل الدخول عبر SSH وتشغيل .launcher ثم الدخول إلى app، وظهرت لنا الملفات في الطرفية موجودة في var/www، لكن هذا المسار غير موجود عند تسجيل الدخول إلى الخادم. جربنا var/lib/docker/containers ولم نجد شيئًا. أين بالضبط توجد ملفات Discourse؟ شكرًا لكم.
That is how Docker works, the actual files are inside a Docker container, and therefore “invisible” using Filezilla.
If you want to test modifications to Discourse, like plugins and themes, you won’t be able to do it in a production install.
For themes check Beginner's guide to using Discourse themes
For plugins Beginner's Guide to Creating Discourse Plugins - Part 1
Is there another way to install this other than using docker then? I have read all the guides, but it’s kind of difficult to develop with invisible files.
The paradigm is very different from the 90’s PHP applications, where it was normal to edit files in production servers using FTP.
Changes to Discourse behavior are supposed to be separate projects, living in a git repository of their own, and to make use of the existing plugin and theme APIs.
So let’s say you want to add an extra field to the topic composer where a user will add their preferred color. You will create a new Discourse plugin following Beginner's Guide to Creating Discourse Plugins - Part 1, then put that on GitHub in a repository named discourse-favorite-color and install that to your instance using Install Plugins in Discourse
OK, got it. Will have to get used to this new way to develop. Just curious, every time we add a plugin we need to ./launcher rebuild app? And then do that again when modify the plugin?
Yes.
However, that is something that should happen infrequently, as that is your production install.
For development and test purposes, the very first part of Beginner's Guide to Creating Discourse Plugins - Part 1 tells you to setup a “Development Environment” where you can do changes and test just refreshing your browser.
That’s what I do, though you can also do an upgrade via the web interface at /admin/upgrade.
Also, a 2-container install lets you upgrade like
./launcher bootstrap web_only
./launcher destroy web_only; ./launcher start web_only
so your site is down just as long as it takes the new server to boot up (about a minute).