Found orphan containers
Hi,
First of all, congrats on the great work on making sidekick available!
I've deployed in a fresh VPS and the launch went smooth. When I tried to deploy a new version this happened (and happens all the time I do it):
panic: error running command - export SOPS_AGE_KEY=AGE-SECRET-KEY-THE-SECRET-HAS-BEEN-REMOVED &&
cd test_app &&
old_container_id=$(docker ps -f name=test_app -q | tail -n1) &&
sops exec-env encrypted.env 'docker compose -p sidekick up -d --no-deps --scale test_app=2 --no-recreate test_app' &&
new_container_id=$(docker ps -f name=test_app -q | head -n1) &&
new_container_ip=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $new_container_id) &&
curl --silent --include --retry-connrefused --retry 30 --retry-delay 1 --fail http://$new_container_ip:443/ || exit 1 &&
docker stop $old_container_id &&
docker rm $old_container_id &&
sops exec-env encrypted.env 'docker compose -p sidekick up -d --no-deps --scale test_app=1 --no-recreate test_app' : - time="2024-11-13T16:47:26Z" level=warning msg="Found orphan containers ([sidekick-traefik-service-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up."goroutine 3 [running]: github.com/mightymoud/sidekick/cmd/deploy.init.func1.1() github.com/mightymoud/sidekick/cmd/deploy/deploy.go:177 +0x1c1d created by github.com/mightymoud/sidekick/cmd/deploy.init.func1 in goroutine 1 github.com/mightymoud/sidekick/cmd/deploy/deploy.go:86 +0xb6b
Not sure what the issue is. This a simple Django app that is listening on port 80 and 443 to expose an API. I thought my the ports were causing this issue so I changed my app to run on a single port (8000) and the issue remains.
Apart from that, my changes weren't on the docker image itself just on the Django app code.
Any insights on how to proceed from here?
I ran docker ps on the VPS and the two containers test_app-1 and test_app-1 are running as expected.
Thanks!
EDIT1: whenever I deploy the new version doesn't run, only if I manually remove the containers and then deploy again.
Source: MightyMoud/sidekick