Replies: 3 comments 3 replies
-
I would recommend to rename your custom template to something different than bootstrap.php (not bootstrap5.php, though, maybe bootstrap-custom.php?). Then you can indeed just copy the files from the release archive over the existing installation. You will then want to copy the updated the SRI hashes (those long hex-strings in the script tag) from the new bootstrap.php onto your template or use some other method of regenerating them in your template. Personally, I have come to like the convenience of using Linux container images, hosted on your container-runtime of choice (podman, docker, k8s, ...) and with data folder, configuration files and (in your case) template attached into the image. Hence my motivation to offer images for this project as well. We have two flavors ATM, one with a traditional nginx + php-fpm stack and the other using the newer nginx unit application server. Both come in variants for the different backends and a chunkier all-in-one image that supports every backend (useful for migrations). Some people use git as an upgrade mechanism. Checkout a specific release and use that same mechanism to switch from one release to the next. The configuration file and your custom template (if renamed) would just show up as two uncommitted files and not conflict any of the files from source control. We do try and support this as well, which is why we have vendored in the php-files from composer libraries and third party js-files. |
Beta Was this translation helpful? Give feedback.
-
Hi @elrido , As for the copying of the SRI hashes I believe I have found it within the bootstrap.php, it should look like this below? It does seem that your containers will be a better option but I'll probably need to sit down for a long time and really learn those. I started with Apache2 actually just a few months ago and started a couple sites, such as PrivateBin. |
Beta Was this translation helpful? Give feedback.
-
Another tip for upgrading templates: You may want to check the git history of this project of the template you've used as the basis. Just go to https://github.com/PrivateBin/PrivateBin/tree/master/tpl and select your template. Then click on history. You can also go to the latest release page on GitHub and then click on Compare, go to "Files Changed" and find the template file there. More information and alternative ways here. This may give you a hint on what to (potentially) adjust etc. |
Beta Was this translation helpful? Give feedback.
-
Describe the problem/question
Hi Everyone,
I have successfully been using PrivateBin and implemented it in my place of work but would like to know the best method of upgrading from 1.6.2 to the latest version. I have extensively adjusted the boostrap.php so that when you go to the website it looks different than the base version. Same with the config file and the data in the directory, am I to make a backup of these then drop in those files over the new ones? Re-do the ownership of the files and modify them? Everytime there's a new release?
Did you use the FAQ section?
What you did?
This is a question
What happens
No response
What should happen
Any future options to basically grab the latest files, put them into a 2nd storage location for my Privatebin versions and then run a script that asks me to upgrade and then pull the edits from the old files and put them into the new?
Additional information
No response
Server address
No response
Server OS
Ubuntu 22 Server
Webserver
Apache2
PrivateBin version
1.7.2
Browser and version
No response
Local operating system and version
No response
Issue reproducibility
No, I cannot reproduce it on https://privatebin.net.
Beta Was this translation helpful? Give feedback.
All reactions