I've made a correct Procfile but I dont see a worker dyno in the dashboard
Asked Answered
B

4

6

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

Brecciate answered 5/2, 2019 at 0:19 Comment(4)
Was your build successful? Do you see your app's code when you run heroku run bash?Contradistinguish
@DamienMATHIEU When I run heroku run bash it executes without errors, it doesnt print anything it just gives me the bash prompt to type. On 'ls' I see every file/folder except the Procfile, should it be invisible or is this the problem?Brecciate
If the Procfile isn't there, it means you haven't committed. It may be in gitignore, or you didn't commit the change.Contradistinguish
@DamienMATHIEU I did git 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 whatsoeverBrecciate
B
0

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

Brecciate answered 6/2, 2019 at 0:3 Comment(0)
T
10

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
Turbojet answered 10/8, 2019 at 20:1 Comment(0)
S
4

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"

Seen answered 22/5, 2019 at 23:54 Comment(1)
Thanks for this. The guide I was following specifically said to name it procfile and I could not figure out why it wasn't being recognized.Cardholder
B
0

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

Brecciate answered 6/2, 2019 at 0:3 Comment(0)
O
0

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.

Ozieozkum answered 21/10, 2020 at 10:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.