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.
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 .
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: