Local development #1328
-
Describe the problem/questionHi, I want to contribute to this project because I use it and its great! I don't want to use devcontairs as suggested in the dev README. I want to run my own IDE and my own development server for php/js. However I can't find any documentation on how to do this. In an ideal world I would run a docker container which mounts the privatebin code into it and supports hot reload so I can see the changes I make. Does something like this already exist in private or does it need to be implemented? Thanks! Did you use the FAQ section?
What you did?Doesn't apply to this question I think. What happensNo response What should happenNo response Additional informationNo response Server addressNo response Server OSNo response WebserverNo response PrivateBin versionNo response Browser and versionNo response Local operating system and versionNo response Issue reproducibilityNo, I cannot reproduce it on https://privatebin.net. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use the usual ones and mount stuff in there, hot reload is AFAIK not supported. But I have not used them. Also, BTW, if you use containers you could also use (local) devcontainers, it's basically the same. Anyway, apart from that, if you want a "traditional" experience, just use any IDE and phpunit/PHP dev tools and maybe the ones you need for JS. I can also just recommend what the guide recommends. If anything is missing, feel free to add it. |
Beta Was this translation helpful? Give feedback.
Indeed, for my local IDE-based development I too use our own container images.
To run the locally checked out repo I use the following helper script:
When changing JS files, you will need to update the SRI hashes (or temporarily remove them from the template used), for example by running phpunit and then
docker restart pb
to ensure the webserver- and php-op-caches get refreshed and reloading the page in the browser actually loads the new code and the container doesn't serve yo…