Closed mayeulk closed 1 year ago
Hi @mayeulk. It's been a long time since I don't touch this project in production, but I would happily help you on this. In case there's not a more easy way to dockerize Uwazi, I could do it again, but I would need someone more to at least test the end result!
What I'm sure I could do is, at minimum, update all dependencies and check if the Uwazi welcome screen load is okay. What might be necessary just after this would be to test a bit if the app itself is still running okay with docker.
If I reply in the next few days, maybe by the next week we have this issue fixed.
Waitng, Rocha
Confirmed!
Maybe it could be a good idea to update the underlying operational system and the dependencies, so you could test a newer release? This would take a bit more time from me, but might be better than just keep using outdated debian.
The current one uwazi-docker hardcoded on v1.4 (see https://github.com/huridocs/uwazi/releases/tag/v1.4) and the last one tagged with a lower release rate was 1.6. Even if I let the script always use the latest (current number: v1.123.2), at least after a few years, some dependency might stop working. Not sure how I would organize this (maybe another user option to manually select the Uwazi version?) but it tends to be a good idea to have a docker image able to at least run and be somewhat tested. Or we could simply let using the latest version and wait for anyone in the future to report that with the latest, the docker-uwazi has some dependency broken with the latest uwazi.
Hi @mayeulk , this issue is now fixed. Maybe I will have newer ones, feel free to open other issues.
Actually, I took the time to do a quick fix on some small improvements that could be done as parameters, so at least the upgrades which does not involve major database upgrade (ElasticSearch and MongoDB) can now be executed with a upgrade command which will run yarn migrate and yarn reindex. This wasn't exposed on previous versions of this repository.
Also pinging @vasyugan . Maybe there's some bits on this branch he would be interested to copy and paste on his fork. (there is also a fork by @bardocuteam, so another pinging)
At this moment I'm not using Uwazi in production, so for both of you, I would need steps to reproduce if you open newer issues. But in general, some things that might be complex, such as the MongoDB and the ElasticSearch upgrades, I think I would be pretty comfortable to update like was done since this issue was opened.
I didn't attempt to use the very last Debian 12 Bookworm (which will have a LTS by 2028, see https://endoflife.date/debian) but now is the Debian 11 (Bullseye), but if you want we could do a quick check.
Relevant point which is different from current Uwazi documentation: this Uwazi-docker is using MongoDB 6.0, not the MongoDB 4.2, which I had problems using recently Debian. In theory the Uwazi app is working, but I haven't tested every feature, so in particular @acme might need to do tests on a backup (not main database) and maybe warn me if it was a bad idea.
If you all have some time next weeks and are interested, I could try to test again on very recent Debian, so we might push the versions up and for several years just keep doing minor incremental upgrades. For now I only done with MongoDB.
But, as expected, the fititnt/uwazi-docker, even with current approach of point to latest production
tag of uwazi, is granted "to break" after some years because of the dependencies, however this likely to be better since at least the ones who are users don't stay with version too older.
Hi, thanks a lot for this! I'll be happy to make more tests and contribute to other tasks.
The server now seems to work, I was able to use many features.
EDIT: I'm copying all my comments below about "Redis connection in broken state " in https://github.com/fititnt/uwazi-docker/issues/50
However, after a while (maybe 30 or 60 minutes?), the uwazi-docker_uwazi_1 container stops. Below are extracts of the logs. Attached are longer logs. Happy to provide more if needed.
2023-07-25T20:38:37.944Z [uwazi_development] uncaughtException: Redis connection in broken state: connection timeout exceeded.
Error: Redis connection in broken state: connection timeout exceeded.
at RedisClient.connection_gone (/home/node/uwazi/prod/node_modules/redis/index.js:588:19)
at RedisClient.on_error (/home/node/uwazi/prod/node_modules/redis/index.js:346:10)
at Socket.
logs_uwazi_docker_server_stopping.txt
With timestamps, one sees that error 2023-07-25T20:38:37.945259424Z Error: Redis connection in broken state: connection timeout exceeded.
was just a few milliseconds before the end of the log file.
Note that, in the meantime, uwazi-docker-elasticsearch-1 and uwazi-docker-mongo-1 containers were still running
With bookworm (see https://github.com/fititnt/uwazi-docker/issues/48), the server stopped responding, too, after a while, with the same Redis error: [uwazi_development] uncaughtException: Redis connection in broken state: connection timeout exceeded. Error: Redis connection in broken state: connection timeout exceeded.
Thank you @mayeulk . Already today I will start looking on your feedback.
I was suspecting it would need more tests
https://unix.stackexchange.com/a/508728/455148 said (in 2019):
"Wheezy and Jessie were recently removed from the mirror network, so if you want to continue fetching Jessie backports, you need to use archive.debian.org instead" "Since you’re building a container image, I highly recommend basing it on Debian 9 (Stretch) instead."
Is this project maintained? Thank you. Mayeul