How can I customized my own site

סיכום מבוסס בינה מלאכותית

In a discussion titled “How can I customize my own site” under the Dev category, gaozp asks how to edit Discourse source code locally and push changes to a remote VPS running Discourse via Docker. They propose saving and transferring Docker images but wonder if there’s a more efficient method. Qursch suggests cloning a custom Git repo during installation, but gaozp clarifies that this would require rebuilding images after every code change. merefield and schleifer advise against forking the source code, recommending instead to use a Theme Component or Plugin — which can handle most customizations without rebuilding images. schleifer adds that if forking is unavoidable, one must modify the base image’s source repo and adjust the --run-image parameter in the launcher. gaozp acknowledges the advice, realizing plugins are the better approach, and thanks the community.

I use an VPS that build my discourse there , and used docker .

I was wonder : how can I edit the source code in my own computer ,and then push this change to the remote machine .

From my opinion :

  1. docker save ***
  2. scp xxx@xxxx // copy docker image to my own machine
  3. do some change
  4. push image to remote machine

I don’t know if there is an more efficient way to develop discourse?

When installing Discourse, you can clone your own Git Repository (with edits) instead of the Discourse one.
Just change the link in the middle line here:

Yes I know what you mean ,
but there are two respository 1. discourse_docker.git 2. discourse.git
discourse_docker doesn’t contain source code , and discourse is the source code .

If I use upper way , I’ll have to rebuild docker images each time when I edit source code .

Or … you could save yourself tonnes of pain and write a Theme Component or Plugin containing your changes …

If you absolutely have to run a fork of the source code (which is definitely not recommended, you can accomplish almost everything with a plugin), then you will need to:

Now I know that , maybe I think in the wrong way . I can just write a plugin that contains my change .

Thank you guys!