fastapi-vue icon indicating copy to clipboard operation
fastapi-vue copied to clipboard

Backend not running unless rerunning docker-compose

Open julianlegouic opened this issue 3 years ago • 0 comments

Hi, many thanks for the hard work and the post associated! It helped me a lot learn about those frameworks :)

However, from a complete fresh start (aka, the first time I build the whole app), it seems I need to run the docker-compose up -d --build twice to get the uvicorn server up. If I only run the docker-compose command once only the frontend is responding to localhost. But when I run the docker-compose a second time, I can get the backend on the port 5000.

I find this weird, considering I tried to connect to the backend container after the first docker-compose command and check if uvicorn was running with the top command in the detached terminal, and I indeed found a uvicorn process running, but the server was not responding on port 5000 until I rerun the docker-compose command.

Any idea why? Is it an issue from my side? Don't know why would it be but still asking..

Thanks!

julianlegouic avatar Oct 24 '22 10:10 julianlegouic