springcomp / self-hosted-simplelogin

Docker-based self-hosted SimpleLogin.io configuration
42 stars 8 forks source link

Upgrading to latest version for usage of mobile apps #12

Closed loeffelpan closed 3 months ago

loeffelpan commented 4 months ago

I'm sucessfully running 4.6.5-beta using your repo. Thanks for your work.

Unfortunately latest mobile app versions using a api endpoint, which was implemented later. I don't know the exact version. As I would like to use mobile apps in my setup, I tried to update to latest version as you've mentioned in your (not yet merged) repo.

Neither with 4.36.6 nor with latest tag of app-ci image I can get this running. In every case sl-app shows WORKER TIMEOUT and doesn't comes up. Any help would be appreciated.

Is it correct to run sl-migration and sl-init at every startup as up.sh would do? I also saw sometime a permission denied on /dkim.key inside sl-app-container. On the next restart of the container it will usually work. Any hint on that? Are there other commands for sl-migration when using another version than 3.4.0 or 4.6.5-beta?

springcomp commented 4 months ago

Hi @loeffelpan

Thanks for your interest in this repository. I must apologize as I can see there is a confusion as the upgrade instructions from the main branch are not complete.

My repository contains two branches, main and 4.36.6, which both include slightly confusing upgrade paths:

It is definitely correct to run sl-migration and sl-init every time as they are designed to be re-entrant.

I think the permission denied thing comes from the fact that the /dkim.key and /dkim.pub.key files must be created before running the up.shcommand. Otherwise, docker will create a folder with this name automatically and then you will most likely encounter this error. My assumption is that you tried to cleanup the code and mistakenly deleted the /dkim.key file. Please, let me know if that is the case.

As you now see, the complete set of migrations from 3.4.0 to 4.6.5-beta I’m aware of are documented in the README.md in my 4.36.6 branch.

That being said, there might be some other issues with using the app-ci version as it seems to not be meant for self-hosting.

Another comment mentions that the latest stable version for self-hosting still seems to be 4.6.5.

loeffelpan commented 3 months ago

Latest stable version is 3.4.0 as in the mastee branch if their repo. But they said in 2022 that they will release next-self-hosted-version ,which is 4.6.5-beta, "in a few weeks". And then came protonmail. Obviously they don't habe any intrest in testing or developing a (tested) version for selfhosting. So any mobile app user has to go with untested app-ci or pay for the SaaS version (what they actually want) to use mobile apps.

But I figured it out. Maybe I had to say that the only issue was a "Worker Timeout" in the logs of sl-app container. In the end you can setup latest version of app-ci from scratch, with or any upgrade path when you run migration and init at any time - as you've mentioned. In my case there was only one thing to adjust to prevent sl-app getting worker timeout. Obviouly I had to adjust the timeout. sl-app starts gunicorn webserver with this CMD in the Dockerfile: ["gunicorn","wsgi:app","-b","0.0.0.0:7777","-w","2","--timeout","15"] I simply added command to the service for the web-app in my compose file and changed it to "--timeout","60" and everything works.