-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker compose up not working #534
Comments
https://github.com/bibektimilsina000/FastAPI-PgStarterKit |
Just a heads up, I download this project recently and it worked for me without any modifications. |
Hey @DungBuiDeveloper, I recently used the project and seems really smooth. I guess you need to explain what issues you face in the issue, so that we have a guide to help you with it. |
I also could not just make it work out of the box. When I run proxy-1 | 2024-08-10T00:27:21Z ERR github.com/traefik/traefik/v3/pkg/server/router/router.go:136 > error="middleware "full-stack-fastapi-project-www-redirect@docker" does not exist" entryPointName=https routerName=full-stack-fastapi-project-frontend-https@docker proxy-1 | 2024-08-10T00:27:21Z ERR github.com/traefik/traefik/v3/cmd/traefik/traefik.go:355 > Router uses a non-existent certificate resolver certificateResolver=le routerName=full-stack-fastapi-project-adminer-https@docker EDIT: these errors still persist, but a |
I have the same issue as you @emirakdere, sadly a simple |
Same Problem here, already spent hours trying to figure out how to acces front & backend when I run Docker Compose - everything starts up, but they do not appear on localhost or localhost/api or localhost/docs as they should. |
I have the same issue |
The issue for me was not the template but my own system, I had Rancher Desktop running, which has its own instance of traefik running within the local kubernetes cluster. I switched off the kubernetes cluster and it worked out of the Box :) |
I had it working out of the box, and I was really excited. But after I tried to add a new table and did an alembic migration i am now getting the same error as you! I have no idea what is going on. Does anybody have an idea how to fix this or even what is happening? I tried rolling things back but still no good. |
I don't know what happened, but I managed to get rid of the error. Then I tried another database migration and now i'm back to the traefik errors again. This is really frustrating. |
did you guys follow the instruction,it may help |
For now i'm developing locally. it was working just fine, but something happened when I tried to create a new database table that caused a catastrophic meltdown for my project. This error basically locked me out and i don't know why or how to reset. In the process I accidentally deleted my last alembic version before i finished downgrading to it. so, it's all a huge mess. two things that would really help me out:
Any help here would be awesome. I struggle with all of this docker and dev ops stuff. |
I managed to get the server running again somehow this morning and began making progress again. However, I changed something in the docker configuration to add an additional host, and the entire thing fell apart. It won't build, the backend won't run, and i can't track down the issue. This framework looked really promising, but I have to say that the back-end with docker is brutal. I have no idea how to get it started back up again. I've reverted everything back, I've tried to upgrade the database head, i've deleted the docker containers and volumes, i've tried to do a --build. This framework works really well until it just doesn't. If anybody has any tips on this, docker is not my strong suit. I'm working in the development environment on windows 11. i'm running the backend in docker and then i'm running npm build dev so I can work locally. 2024-08-31 10:11:37 proxy-1 | 2024-08-31T15:11:37Z DBG github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:22 > Creating middleware entryPointName=https middlewareName=traefik-internal-recovery middlewareType=Recovery |
I can't even get a fresh install from the repository working now. I have no idea.
what am i missing here. I'm completely shut out in a local dev environment. Has anybody else experienced this? |
same issue for me! |
Good evening everyone, After facing this error, which suddenly appeared without clear explanation, I decided to start from scratch. Below is my approach: First, I recommend watching Tiangolo’s video, which explains how to set up Traefik with a FastAPI server and its own Docker image: "FROM tiangolo/uvicorn-gunicorn-fastapi.10." https://www.youtube.com/watch?v=7N5O62FjGDc Next, while looking at my proxy logs more closely, the first warning/error I noticed was that it couldn't find the network "traefik-public." In the production config, you need to first run docker network create traefik-public and then use it as external: true. In the development config, it was set up with external: false, but strangely, it wasn't working anymore. Finally, I switched the network to driver: bridge in the docker-compose.yml file.
Then I realized that while using this template, I had changed the stack name and forgot to update the "STACK_NAME" environment variable. I eventually removed the STACK_NAME from the docker-compose.yml and added a container_name for each service.
After that, I noticed that the lines - traefik.constraint-label=traefik-public were incorrect. By running docker inspect backend, I found that the network name used by my containers was "my-project_traefik-public", where "my-project" is the folder name where I used this template. So, I replaced all the constraint-labels with my actual network name. There you go, enjoy debugging! Stay strong everyone! |
It works! Thanks @MP242 |
Given this issue is a bit confusing, I'm going to share how I debugged through this issue. Lesson learnt: After the I tried to manually start |
The text was updated successfully, but these errors were encountered: