To upgrade the app:
package.json
file in
the root directory of OED. All the officially released and tagged versions is given on the OED GitHub
release page. You probably want the most recent version but certainly one that is later than what
you currently have (OED cannot migrate to a previous version and can only upgrade).docker compose exec database pg_dump -U oed > dump_$(date +%Y-%m-%d"_"%H_%M_%S.sql)
. It will
create a file name starting with dump_
, then have the date & time and finally have the
.sql
file extension. This file should have the needed commands to recreate the database if
something should go wrong. You can delete this file once you are sure the upgrade was completely successful
if you want to save disk space. You can contact the OED project if you need to restore the database due to
issues.
systemctl stop oed.service
. This assumes you named the
service oed.service as is the default in the installation directions. You can check the status of the
service with systemctl list-units --type=service | grep -i oed
where it will not be listed if
it is stopped. Note this means that the OED
website/service is no longer available. It will not be permanently available again until you restart the OED
service at the
end of this process.git stash
git fetch --tags
.git checkout <tag_name>
where you
replace <tag_name> with the tagged version you want. For example, to go to v0.7.0 use
git checkout v0.7.0
.
git stash pop
. You will see messages including about
Changes not staged for commit:
. This is okay since you are not going to commit these changes
back to the OED repository (you are actually in a detached head git state). It is unlikely that git cannot
put back your local changes. If you get merge warnings then see if the named file has lines with multiple
"<<<<" and ">>>>" in a row. If so, then there were merge conflicts. You can try to
edit the
file to decide which of the listed lines you need. You are also encouraged to contact the OED project for
help with this situation.
docker compose run --rm web src/scripts/updateOED.sh
. This will reinstall the node packages
because there are usually changes, update the database for the new version of OED and then build the new
application. When you see a line similar to
[at-loader] Using typescript@3.5.3 from typescript and "tsconfig.json" from /usr/src/app/tsconfig.json.
in the terminal, OED will be doing the install and may take a while to complete without showing any output.
docker compose up
. This is the same step as the original build from
the first OED installation and can take a little while. See the OED
installation page for further information. You should then be able to access OED via a web browser
to see it is running properly and has all the data and settings you had before the upgrade. Doing it outside
the Unix service makes it easier to see any issues during the build steps. Once you complete this step then
do "^c" in the terminal where you did the docker compose up
to shut down OED. Be a little
patient since doing a second "^c" will cause a rapid stop of docker without the normal cleanup.
systemctl start oed.service
.