Closed aberral closed 1 month ago
What operating system are you using?
Hi there!, I have tested it in unix like OS (Ubuntu 22.04.4 LTS and CasaOS, which is Debian GNU/Linux 11 (bullseye)).
I just pulled the docker image on a clean system (ubuntu 24.04). I was able to register a brand-new email with no issue. To go over my steps:
Delete all local docker images and volumes (just to be sure):
docker system prune --volumes --all --force
Created the .env:
BASE_URL=http://127.0.0.1:8000 SECRET_KEY=randomkey SQLALCHEMY_DATABASE_URI=sqlite:///db.sqlite MAIL_SERVER=smtp.mailgun.org MAIL_PORT=587 MAIL_USE_TLS=1 MAIL_USERNAME=no-reply@kettlewright.com MAIL_PASSWORD=somepassword REQUIRE_SIGNUP_CODE=True SIGNUP_CODE=somecode WORKERS=1 USE_REDIS=False REDIS_URL=redis://redis-server:6379/0%
Pull the image:
docker pull yochaigal/kettlewright
Run the container:
docker run -d --name kettlewright --env-file ~/docker/kettlewright/.env -v kettlewright_db:/app/instance -p 8000:8000 --restart always yochaigal/kettlewright
Go to 127.0.0.1:8000
Sign up.
Received email.
Can you try to recreate the env file? Copy and paste what I have and fill it in.
Did you run the python script inside the container? I know you said you pinged the server from within it, I just wonder if there is a larger DNS issue going on with the docker container's network itself. When you tested it on another machine, did the emails not send there as well? Could it be a local network issue?
I assume you're using an app password for google as well?
Just to be sure, I setup an app password in Gmail (using a google workspace account) and changed my .env accordingly. I had no issues.
I've re-run and re-deployed the image after pruning images & volumes as you said. It now works with the required sing-up code. Regarding your questions, yes, I've tested it on two separate networks, one at home and one at work. And yes, I'm indeed using a Google Apps password. I have tested removing the signup code and it seems to work as well. I suspect it was some weird error related to volumes or the image that disappeared after I pruned it.
Interesting! Did you rebuild the .env? There could have been whitespace or something. Anyway, glad it works now.
Yes, I used terminal to create a new .env in a different folder and pasted in and edited what you commented. The only difference I can see between the files is the randomkey used: "randomkey" in the working version and "a~UB;_uM^Kd$}?z)kfQ5<6" that i generated randomly. Maybe some character of this last randomkey was affecting the code in some way?. Anyways, thank you so much for your help, now I can share and enjoy it with my players!!! :)
Hmm, I don't think so. That key specifically relates to session data. Still, good to know!
Hi, I've been trying to run Kettlewright on my server as a Docker container. The container is running, the website is accessible, but when I try to register an account the container throws this exception (as seen in the logs):
I've tried to pinpoint where the error is coming from, but have been unable to do so. The .env configuration that I have is something like this:
I've tried to exec into the container and pinging 'smtp.google', which is successful. I've also run the following Python script to test that the credentials that I have for gmail are working as intended:
This test email works and is received (both sent and received by gmail accounts). So I am at a bit of a loss as to how to try to fix this problem. I have also ruled out a port or system related error as I have tested it on another machine with and without other containers occupying port 8000. I hope you can help me solve this problem and congratulations on the app, it is fantastic.