Skip to content
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

Deploy by role does not work #709

Closed
morgoth opened this issue Mar 7, 2024 · 2 comments
Closed

Deploy by role does not work #709

morgoth opened this issue Mar 7, 2024 · 2 comments

Comments

@morgoth
Copy link
Contributor

morgoth commented Mar 7, 2024

I have 2 hosts - one is for web, the other for job + notification services.
When I run bin/kamal deploy -d production -r notification, I'm getting:

docker stdout: Nothing written
docker stderr: docker: open .kamal/env/roles/route-optimizer-web-production.env: no such file or directory.

There is no web role on this host, so this shouldn't be needed there.
The deploy to all servers runs fine, ie bin/kamal deploy -d production

kamal version: 1.3.1

@argia-andreas
Copy link

For additional context:
This seems to be due to initial container healthcheck step which is performed with the primary role.

kamal deploy -r secondary-role

Ensure app can pass healthcheck...
  INFO [703ee48c] Running docker run --detach --name healthcheck-primary-role --publish 3999:80 --label service=healthcheck-primary-role -e KAMAL_CONTAINER_NAME="healthcheck-primary-role" --env-file .kamal/env/roles/primary-role.env --health-cmd "curl -f http://localhost/up || exit 1"
  INFO [a8ccc7f3] Finished in 0.075 seconds with exit status 123 (failed).
Releasing the deploy lock...
  Finished all in 22.6 seconds
  ERROR (SSHKit::Command::Failed): Exception while executing on host 192.168.0.11: docker exit status: 125
docker stdout: Nothing written
docker stderr: docker: open .kamal/env/roles/primary-role.env: no such file or directory.

@djmb
Copy link
Collaborator

djmb commented May 2, 2024

This should be fixed by #740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants