full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

First step (login, backend not start)

Open joCoutu opened this issue 5 years ago • 6 comments

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"

joCoutu avatar Dec 22 '20 10:12 joCoutu

What dev dependency was it missing?

Mause avatar Dec 22 '20 10:12 Mause

No module named 'tenacity'

joCoutu avatar Dec 22 '20 14:12 joCoutu

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 avatar Feb 22 '21 14:02 maneeshkm

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

maneeshkm avatar Feb 23 '21 05:02 maneeshkm

Can confirm @maneeshkm's fix worked for me

nateraw avatar Mar 08 '21 17:03 nateraw

Fix solution:

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

ENTRYPOINT ["poetry", "run"]

AlanMars avatar Apr 18 '23 04:04 AlanMars