fastapi / full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.
MIT License
27.63k stars 4.92k forks source link

First step (login, backend not start) #334

Open joCoutu opened 3 years ago

joCoutu commented 3 years ago

Hello I'm new user.

# What I did:
pip install cookiecutter
cookiecutter https://github.com/tiangolo/full-stack-fastapi-postgresql
docker-compose up -d

# The backend was not started and not able to login 
# It was missing some dev dependency

# work around
vim  myproject/backend/backend.dockerfile
        # Allow installing dev dependencies to run tests
        RUN bash -c "poetry install --no-root"
Mause commented 3 years ago

What dev dependency was it missing?

joCoutu commented 3 years ago

No module named 'tenacity'

maneeshkm commented 3 years ago

How did you eventually solve this? @joCoutu

Facing same issue, I tried RUN bash -c "poetry install --no-root" but still getting the following error:



File "/app/app/backend_pre_start.py", line 3, in <module>

from tenacity import after_log, before_log, retry, stop_after_attempt, wait_fixed

ModuleNotFoundError: No module named 'tenacity'
maneeshkm commented 3 years ago

I upgraded to Python 3.8 and it started working for me. Needed changes in /backend/backend.dockerfile, /backend/celeryworker.dockerfile and /backend/app/pyproject.toml from 3.7 to 3.8

nateraw commented 3 years ago

Can confirm @maneeshkm's fix worked for me

AlanMars commented 1 year ago

Fix solution:

Add code below in dockerFile. It works for me in Python3.8

ENTRYPOINT ["poetry", "run"]