Ich habe das Discourse Repository auf GitHub geforkt. Wie kann ich es durch die bestehende Discourse-Installation auf meiner Website ersetzen?

I forked the Discourse repository on GitHub. How can I replace it with the existing Discourse installation on my site? I have tried everything, but I encountered errors each time. I added my own Discourse repository from GitHub to the app.yml file, but I couldn’t proceed due to errors. Even when I managed to make the changes, it always reinstalled the original Discourse. How can we properly execute this process?

It helps to be specific.

1 „Gefällt mir“

Upon re-examination, I made a modification to the discourse I was analyzing, and I noticed that this change is visible on the update page within the admin panel. I am now updating it; if the adjustment functions correctly, I will revise this message accordingly.

These are the settings in my app.yml file, which I have rebuilt without encountering any errors. However, upon subsequent review, the modifications I made are not visible, although Discourse continues to operate flawlessly.

run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec:
     cd: /var/www/discourse
     cmd:
         - sudo -u discourse git remote set-url origin https://github.com/KilicSelcuk/discourse.git
         - sudo -u discourse git fetch origin
         - sudo -u discourse git checkout origin/main
         - sudo -u discourse git remote set-branches --add origin main
         - sudo -u discourse git remote set-branches origin tests-passed
         - sudo -u discourse git reset --hard origin/main
  - exec: echo "End of custom commands"

So when you do view source and look at the 6th line or so, does the commit hash in the version string correspond to the latest commit in your forked repository?

I believed I had completed the task, but it appears to be ineffective. The latest update visible on the admin update page is: https://github.com/KilicSelcuk/discourse/commit/e44347414a8325ec25e5892c35bcd889d39a6668.

However, the actual modifications I made are reflected here: Commits · KilicSelcuk/discourse · GitHub.

In essence, the changes I implemented are not visible on the update page. Additionally, when I perform a rebuild, it does not incorporate my repository’s updates. If the changes had been applied, they would be visible.

My most recent configuration is as follows:

## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## To set the 'From' email address for your initial registration, uncomment and modify:
  ## After receiving the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec:
     cd: /var/www/discourse
     cmd:
         - sudo -u discourse git remote set-url origin https://github.com/KilicSelcuk/discourse.git
         - sudo -u discourse git fetch origin
         - sudo -u discourse git checkout origin/main
         - sudo -u discourse git remote set-branches --add origin main
#         - sudo -u discourse git remote set-branches origin tests-passed
#         - sudo -u discourse git branch -u origin/main
         - sudo -u discourse git reset --hard origin/main

Resolving this issue would be beneficial. I couldn’t find a helpful resource on the forum, but it might serve as a guiding reference for those who follow.

That’s usually a bad idea. You should make changes in a plugin.

2 „Gefällt mir“

Indeed, I was originally doing this, but once the plugin was integrated into the core, I am no longer able to modify it. Unfortunately, the suggested solutions also proved ineffective: Overriding user_guardian.rb in a plugin (no fork necessary!) - #24 by kuaza

If you have forked a plugin, then you should rm the included plugin and clone your version.

I think I’ve told told you about this in another topic. You definitely want to fork just the plugin and not the whole app and all the other plugins.

I encounter an error whenever I attempt to install the plugin. If I have more time, I will try again: Overriding user_guardian.rb in a plugin (no fork necessary!) - #29 by pfaffman

That is the way to solve your problem. If you have an error, and want help, you should say exactly what the error is, and include the plugins section of your yml file and a link to your forked plugin.

2 „Gefällt mir“