Kamal deployment failing

Apologies for posting this here but I simply cannot work out what the problem is…

We’ve a new app created from your starter templates (blazor-vue), and followed your how to deploy using Kamal video. The build, build-container workflow are working well but the release workflow fails, as shown below.

Any ideas what I need to do to fix this?

Launching command with version latest from new container...
INFO [7bbbe2e9] Running docker run --rm --network kamal --env ASPNETCORE_FORWARDEDHEADERS_ENABLED="true" --env-file .kamal/apps/my-app/env/roles/web.env --log-opt max-size="10m" --volume /opt/docker/MyApp/App_Data:/app/App_Data ghcr.io/company/myapp:latest --AppTasks=migrate on [ip address]
ERROR (SSHKit::Command::Failed): Exception while executing on host [ip address]: docker exit status: 125
docker stdout: Nothing written
docker stderr: docker: open .kamal/apps/my-app/env/roles/web.env: no such file or directory.
See 'docker run --help'.
Error: Process completed with exit code 1.

Not sure, we’re using the same GitHub Action Templates in the blazor-vue template to deploy it to the live demo at https://blazor-vue.web-templates.io

These are the logs of the last successful run:

https://github.com/NetCoreTemplates/blazor-vue/actions/runs/13264960857/job/37030024382

Which is running the migration docker command successfully:

From the logs:

Launching command with version latest from new container...
  INFO [e20e9849] Running docker run --rm --network kamal --env ASPNETCORE_FORWARDEDHEADERS_ENABLED="true" --env-file .kamal/apps/blazor-vue/env/roles/web.env --volume /opt/docker/blazor-vue/App_Data:/app/App_Data ghcr.io/netcoretemplates/blazor-vue:latest --AppTasks=migrate on ***
  INFO [e20e9849] Finished in 2.158 seconds with exit status 0 (successful).

You can try running the kamal commands from your local GitHub repo to see if you can repro the issue and hopefully identify what the issue is.

Thanks for the info…

So I’ve found that if the ‘Check if first run and execute kamal app boot if necessary’ step fails it leaves the .repo_name file in place which makes subsequent runs think its not the first run and skip the kamal app. boot.

We followed the instructions exactly and created a Hetzner account and the same spec server as the one in the tutorial. But we get a permission denied error from the docker daemon when Kamal is booting…

  ERROR (SSHKit::Command::Failed): Exception while executing on host [IP Address]: test -f .DataSync_Core exit status: 1
test -f .DataSync_Core stdout: Nothing written
test -f .DataSync_Core stderr: Nothing written

App Host: [IP Address]
  Finished all in 4.9 seconds
  ERROR (SSHKit::Command::Failed): Exception while executing on host [IP Address]: docker exit status: 1
docker stdout: Nothing written
docker stderr: Error response from daemon: denied

I’m beginning to think this is caused by a private repo, so docker can’t pull the container… is that possible?

Ignore all my ramblings :slight_smile:
Turns out it was the connection string so the app task migrate couldn’t run

1 Like