full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
You need to create a swarm-scoped network before the stack is deployed
After building and running deploy, I'm getting this error.
Error:
network "traefik-public" is declared as external, but could not be found. You need to create a swarm-scoped network before the stack is deployed
docker network ls
2e1b7e59a2e3 fast-api-test-proj_default bridge local
ce37fdaa9fcd fast-api-test-proj_traefik-public bridge local
I assume this network name should be traefik-public and not prefixed with the project name, that was created automatically during some step?
Do I have to manually create the network?
docker network create --driver=overlay traefik-public
What are the proper steps to get a deploy?
I managed to create the stack, created that network, but I'm unable to connect on local machine. It works with docker-compose up but not with the swarm stack.
Running on Windows WSL2, docker for windows with swarm enabled v2.3.2.
DOMAIN=fast-api-test-proj.com TRAEFIK_TAG=fast-api-test-proj.com STACK_NAME=fast-api-test-proj-com TAG=prod bash ./scripts/deploy.sh
I tried
DOMAIN=localhost TRAEFIK_TAG=fast-api-test-proj.com STACK_NAME=fast-api-test-proj-com TAG=prod bash ./scripts/deploy.sh
http://localhost:8090/
Can someone point me to proper steps setting a local swarm going?
I had the same error and it was because there was not network named traefik-public running yet. Take a look at this and the explanation of how to set up Traefik there. It should get you up to speed. And of course Issue #240 clarifies a whole lot about actually needing two (!) running Traefik containers.
run the following command
network create -d overlay traefik-public
Please use the right comand: docker network create -d overlay your-network-name