SamR1 / docker-fittrackee

GNU General Public License v3.0
13 stars 0 forks source link

fittrackee.emails.exceptions.InvalidEmailUrlScheme #1

Closed sgofferj closed 3 years ago

sgofferj commented 3 years ago

I finally got the time to look into the Docker deployment. I ran into 2 issues for the beginning. First is that the app container fails with this error:

fittrackee       | Traceback (most recent call last):
fittrackee       |   File "/usr/local/bin/fittrackee", line 5, in <module>
fittrackee       |     from fittrackee.__main__ import main
fittrackee       |   File "/usr/local/lib/python3.9/site-packages/fittrackee/__main__.py", line 23, in <module>
fittrackee       |     app = create_app()
fittrackee       |   File "/usr/local/lib/python3.9/site-packages/fittrackee/__init__.py", line 50, in create_app
fittrackee       |     email_service.init_email(app)
fittrackee       |   File "/usr/local/lib/python3.9/site-packages/fittrackee/emails/email.py", line 83, in init_email
fittrackee       |     parsed_url = parse_email_url(app.config['EMAIL_URL'])
fittrackee       |   File "/usr/local/lib/python3.9/site-packages/fittrackee/emails/utils_email.py", line 11, in parse_email_url
fittrackee       |     raise InvalidEmailUrlScheme()
fittrackee       | fittrackee.emails.exceptions.InvalidEmailUrlScheme

I did put this to .env:

export EMAIL_URL=smtp://none:none@mail:25

The other is that make init fails but I haven't had time to investigate that further. I'll open another issue when I get there and can't fix it myself.

SamR1 commented 3 years ago

Hi,

With a fresh install after deleting all my existing containers, I did not managed to reproduce the error.

The only way I found to reproduce it was to only create .env file without updating it before make build (the container failed to start).
The build step copies the incomplete file which is then used by the app, updating it after build will not fix this issue (make init will fail too with an incomplete .env). build needs to be relaunched.

Did you have this issue despite updating .env before build step?

sgofferj commented 3 years ago

Jup. I just tried deleting the containers and running make build again. The build goes through but make run fails to start the app container.

Error is the same:

fittrackee       | Traceback (most recent call last):
fittrackee       |   File "/usr/local/bin/fittrackee", line 5, in <module>
fittrackee       |     from fittrackee.__main__ import main
fittrackee       |   File "/usr/local/lib/python3.9/site-packages/fittrackee/__main__.py", line 23, in <module>
fittrackee       |     app = create_app()
fittrackee       |   File "/usr/local/lib/python3.9/site-packages/fittrackee/__init__.py", line 50, in create_app
fittrackee       |     email_service.init_email(app)
fittrackee       |   File "/usr/local/lib/python3.9/site-packages/fittrackee/emails/email.py", line 83, in init_email
fittrackee       |     parsed_url = parse_email_url(app.config['EMAIL_URL'])
fittrackee       |   File "/usr/local/lib/python3.9/site-packages/fittrackee/emails/utils_email.py", line 11, in parse_email_url
fittrackee       |     raise InvalidEmailUrlScheme()
fittrackee       | fittrackee.emails.exceptions.InvalidEmailUrlScheme
sgofferj commented 3 years ago

Is there a debug option that I could add to the CMD fittrackee in the Dockerfile?

sgofferj commented 3 years ago

Solved. My docker-compose needed updating. Running now.

SamR1 commented 3 years ago

Great!