tiangolo / full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

backend_1 error

Fil2ST opened this issue · comments

commented

2023-04-10 14:03:36 Checking for script in /app/prestart.sh
2023-04-10 14:03:36 Running script /app/prestart.sh
2023-04-10 14:03:37 Traceback (most recent call last):
2023-04-10 14:03:37 File "/app/app/backend_pre_start.py", line 6, in
2023-04-10 14:03:37 from app.db.session import SessionLocal
2023-04-10 14:03:37 File "/app/app/db/session.py", line 4, in
2023-04-10 14:03:37 from app.core.config import settings
2023-04-10 14:03:37 File "/app/app/core/config.py", line 89, in
2023-04-10 14:03:37 settings = Settings()
2023-04-10 14:03:37 File "pydantic/env_settings.py", line 39, in pydantic.env_settings.BaseSettings.init
2023-04-10 14:03:37 File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
2023-04-10 14:03:37 pydantic.error_wrappers.ValidationError: 1 validation error for Settings
2023-04-10 14:03:37 SQLALCHEMY_DATABASE_URI
2023-04-10 14:03:37 userinfo required in URL but missing (type=value_error.url.userinfo)

I had a similar issue where it worked locally but gave me the "userinfor missing" message in the production environment. I'm not entirely sure why it happened, and I haven't found a proper fix yet, but I was able to work around it by providing a ready made SQLALCHEMY_DATABASE_URI env variable instead of only the components.