Im trying to deploy a very simple bot to heroku but I cant set the worker dyno because it doesnt show up on the dashboard, even though I have a Procfile with just one line it: worker: node app.js
So the issue was that Heroku only builds off the master branch and I was developing on a different branch. I solved this by assigning my current branch as the master branch git push heroku YourDifferentBranchHere:master
Same issue, I resolved it from Heroku documentation:
Scaling a process type
Heroku runs one web
dyno for you automatically, but other process types don’t start by default. To launch a worker, you need to scale it up to one dyno:
heroku ps:scale worker=1
Scaling worker processes... done, now running 1
I had the same issue, correct code but worker didn't appear. For me, the issue was that my Procfile was named "procfile" and not "Procfile"
procfile
and I could not figure out why it wasn't being recognized. –
Cardholder So the issue was that Heroku only builds off the master branch and I was developing on a different branch. I solved this by assigning my current branch as the master branch git push heroku YourDifferentBranchHere:master
The issue was easily solved for me once I changed the procfile
name to Procfile
.
After this I wrote the following code:
worker: node bot.js
$ heroku ps:scale web=1 worker=5
heroku ps:scale web=1 worker=5
Then I refreshed the page, it worked perfectly for me.
© 2022 - 2024 — McMap. All rights reserved.
heroku run bash
? – Contradistinguishgit add .
-git commit -m "Heroku stuff"
-git push heroku master
and it just tells me everything is up to date. It does this everytime actually, so you might be right, but not because I forgot, rather because for some reason its not detecting any changes whatsoever – Brecciate