I don’t have docker, and I’m trying to deploy my Node.js app, this works normally using flyctl deploy (well after some troubleshooting), but:
It gets a lot harder when I try to use script_checks:
Deployment fails, and using flyctl vm status <instance id> gives me: rpc error: code = Unknown desc = bad response code: 500 => Unhandled rejection: Io(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })
Similarly when I try to run the script using bash or sh i.e. "bash /app/health_check.sh" I get:
rpc error: code = Unknown desc = bad response code: 500 => Unhandled rejection: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Now connecting to the machine using flyctl ssh console and running the script manually indeed gives Permission denied error, but running it with bash works normally.
Any idea on how to solve this?
p.s: here’s the repo link, you can see I tried many variations
After some googling, I can set my config in .git to to watch for file modes, this would fix it for using Github Actions, but the remaining question is, does flyctl deploy monitor file mode change (mainly on windows)?
flyctl deploy doesn’t mirror file permissions from your windows local machine, at least from what I have tried so far,
so either:
Use some linux distro and do as what @ignoramous did, i.e. change file permissions and deploy.
Or
Use docker since you can add chmod +x app/bin/* somewhere in your dockerfile
Or
See:
To make file executable in git therefore it will be executable on Github, you will need to deploy using Github Actions, for more help see my repo.