Full update between different PHPBB versions#7
Open
jhauschild wants to merge 9 commits into
Open
Conversation
give it a second chance during install-from-yml.sh
in the existing image, calling `mysql` gives the warning `mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of all: thanks for setting this up! I was using your image to upgrade my board, and eventually made it work =)
Given that the next PHPBB 3.3.16 was released , I was wondering about upgrading between different PHPBB versions, and realized that the container did not have a clear, well-defined upgrade strategy.
In fact, I was trying to migrate an existing forum into the docker container. Following the (full update strategy in PHPBB docs)[https://www.phpbb.com/support/docs/en/3.3/ug/upgradeguide/update_full/], I was mounting volumes for the
files, images, store, ext, stylesandconfig.phpfile.Given that the container has the phpbb files for the current version (or downloads it in the
install-phpbb.shscript if not), this should have worked... but it didn't quite:chmod -R 100:101from within each volume solved it (more below).mysql:8.0image you suggested in the docker-compose example just didn't work for me (it had issues with ssl in the container?!?), but switching tomariadb:latestsolved that problem. Also, callingmysqlfrom the phpbb container gives a deprecation warning that one should use themariadbcommand instead, so migrated to that.install-from-yml.shscript, which in turn failed because the calledphp install/phpbbcli.php install config.ymlexpects an empty database.To address 3., I hence added a
update-db-migration.shscript that instead callsphp install/phpbbcli.php update update-config.ymlwith the config containing just
The script is called from the
docker-entrypoint.shif theconfig.phpalready exists, assuming that in that case the database and volumes are from a previous installation.I still call (and extended) the
install-phpbb.shscript to populate initially empty subfolder volumes (explicitly checking the 5 folders mentioned above).Finally, when testing the setup for a fresh installation I also ran into the permission issue with the
config.phpnot being writable for the inital configuration when using a bind mount. The best fix I could find was to add another/opt/phpbb/configfolder outside of the phpbb script, and copy just the config.php from there to the phpbb folder on container startup, and back at the end of theinstall-from-yml.shscript, which is the only time theconfig.phpshould be written.test setup
Eventually, I was testing the setup locally with:
I copied the docker-compose.yml from the README to a separate file in the repo, which helps to get started, I think.
permission issues caused by build failure
I realized that the images you released don't have the actual PHPBB content in them. Later I saw this discussed in #1 already, but I think it's still not fixed? Maybe the approach with adding the artifacts for specific versions would be good, given that new releases become quite rare these days.
While the docker entry script kind of recovers from that by just downloading the files again, it makes subfolder volume permissions fail: an initially empty volume is populated with the content and permissions of the folder within the image, but if that folder doesn't exist, it just gets root permission, and then the phpbb user can't write to them.
That's why I had to build the images for old versions in the test setup locally as well...
PS: I also noticed that the setup you had was not including the hidden
.htaccessfiles when usingmv "phpBB3"/* ${PHPBB_ROOT}/phpbb/in the Dockerfile. Initially, I was a bit alarmed, until I realized that the .htaccess is not used by nginx anyways. Is there a reason to not include it, though?