-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-setup with Multi-Tree support fails to start the web container #510
Comments
Ok, I think that's a problem with our compose examples for multi-tree. Please try adding |
Thank you! With the I'm still a bit lost on how to continue from here. Opening the service in the browser gives me the login form, but I don't have a user yet. The user registration doesn't work and from the documentation I know that it can't work in multi-tree mode and I should disable it. The "first-run wizard" that's mentioned in the documentation is not shown. https://www.grampsweb.org/multi-tree/ says that users are tied to trees. If I want to create a tree, it is recommended to do that via the web api. But to do that, I need a JWT, which I get by authorizing as a user. That's a chicken and egg issue for me :D |
It should show the first run wizard. Please check the container logs. |
These are the logs of a fresh gramps instance that I started and opened in the browser:
So it seems like the database is not created correctly. |
Did you specify
|
I had not specified I now added this to the compose.yml: I then ran
I tried the command with and without the |
Next try: docker-compose run --entrypoint="" --rm -w /app/src grampsweb python3 -m gramps_webapi --config /app/config/config.cfg user migrate Thanks for bearing with me 😅 |
Ha, that's weird because it means creating the user worked, but fetching a token didn't work, and the Javascript functions for both operations use the same variables for the username and password. If you can start over and monitor the API calls in the browser dev console, that would be useful. Perhaps it's some weird special character issue, but I wouldn't see why... |
I just realized I didn't mention this before: I tried the default compose.yml for a single-tree setup and there everything worked out of the box, with the same username and password that I tried for the multi-tree setup. So I don't think it's a special character issue. |
Ok I think I know what's happening. In the multi-tree setup, the first run wizard creates a site admin, not a tree owner. But the site admin does not have a tree. You would first have to create a tree, or to assign the admin to a specific tree. In a multi-tenant setup, the site admin might anyway just be a service account that is used to create new trees and manage trees, without being itself associated with a tree. Of course, the UI for that doesn't make sense right now and needs to be changed - I'll open an issue in the frontend repo. Your next step is to create a new tree via the API by posting to |
(Thanks by the way for the detailed logs, very helpful!) |
For posting to Do I need to copy the token from the web session, for creating the first tree? I expected that the call to |
Right 🤦♂️ I take that back:
Your logs showed you got a 403 permission denied when trying to fetch a token with username/password, which should work regardless of tree. I will try to reproduce this later, there must be a bug somewhere. |
@strombringer did you manage to create a tree via the api endpoint? |
@Corepex no, I didn't. After the last test in April, I switched to single-tree mode and the setup wizard worked for that. I'll try again when a bugfix is available, though it's not high priority for me. |
FYI, I am running a multi tree setup and creating new trees via the API all the time, so there could be a bug, but it's not obvious to me what it is as I'm not affected by it. |
I'm trying to setup a Multi-Tree installation with Docker and followed the instructions at https://www.grampsweb.org/Deployment/, but starting the grampsweb container fails with this error message:
I'm using the docker-compose file linked in the documentation, with minor changes:
Port, SECRET_KEY, TREE and MEDIA_PREFIX_TREE are changed
My understanding from the documentation is,
https://myhost:13000
to setup the server administrator accountIs my understanding wrong and I overlooked something? Where should I have setup the tree, that's mentioned in the error message?
Thanks in advance for the support!
The text was updated successfully, but these errors were encountered: