Skip to content

Instantly share code, notes, and snippets.

@jarib
Last active March 22, 2017 14:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jarib/3d443c0fdd720f9f0835 to your computer and use it in GitHub Desktop.
Save jarib/3d443c0fdd720f9f0835 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
git clone https://github.com/edsu/anon my-anon
cd my-anon
cp config.json.template config.json
read -p "Please add your config to $(pwd)/config.json, then press enter to continue"
heroku create
echo 'web: coffee anon.coffee' > Procfile
git add Procfile config.json
git commit -m "Added Procfile and config"
git push heroku master
@dainiuxt
Copy link

Everything worked. Now the heroku part left. When I try to start app with dyno to stay in free account, i get the following errors:
2014-07-22T02:54:03.095866+00:00 heroku[api]: Scale to coffee=1 by dainiuxt@gmail.com 2014-07-22T02:54:05.909799+00:00 app[coffee.1]: bash: anon.coffee: command not found 2014-07-22T02:54:05.582447+00:00 heroku[coffee.1]: State changed from starting to up 2014-07-22T02:54:07.478153+00:00 heroku[coffee.1]: State changed from up to crashed 2014-07-22T02:54:07.478873+00:00 heroku[coffee.1]: State changed from crashed to starting 2014-07-22T02:54:04.910285+00:00 heroku[coffee.1]: Starting process with commandanon.coffee 2014-07-22T02:54:07.471273+00:00 heroku[coffee.1]: Process exited with status 127 2014-07-22T02:54:10.190855+00:00 heroku[coffee.1]: State changed from starting to up 2014-07-22T02:54:10.971853+00:00 app[coffee.1]: bash: anon.coffee: command not found 2014-07-22T02:54:12.636831+00:00 heroku[coffee.1]: State changed from up to crashed 2014-07-22T02:54:09.553471+00:00 heroku[coffee.1]: Starting process with commandanon.coffee 2014-07-22T02:54:12.626187+00:00 heroku[coffee.1]: Process exited with status 127

@dainiuxt
Copy link

dainiuxt commented Aug 4, 2014

@jarib, the Proc file should look like 'web: coffee anon.coffe'
Now deployment went OK, but at the present I trying to figure out if there is available to run anon with 1 dyno. Will inform on progress.

@jarib
Copy link
Author

jarib commented Aug 4, 2014

Thanks, updated. I guess you also need to commit config.json for it to work, so I added that as well.

@lokal-profil
Copy link

There is a missing e and a extra ' in the Procfile. Guessing it should look like 'web: coffee anon.coffee'

@jarib
Copy link
Author

jarib commented Aug 5, 2014

@lokal-profil Thanks, fixed!

@dainiuxt
Copy link

dainiuxt commented Aug 6, 2014

@lokal-profil maybe you have experience wit deployng to heroku? I think now I have problems that I want to run anon on only 1 dyno and getting application run errorr.

@cntanos
Copy link

cntanos commented Apr 20, 2016

Same here with heroku. Apart from the fact that you are required to upgrade to cedar-14 from cedar-10, or else you can't push your code, you now get an Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Being a beginner in coffee scripts, I can't find where and if I should assign a port.

Edit: Got it. When in Windows echo 'web: coffee anon.coffee' > Procfile adds the line in the Procfile with quotations. This means that it defaults to npm start, which creates a web worker. Removing the quotes and making Procfile read worker: coffee anon.coffee allows you to run heroku ps:scale worker=1 and avoid the error.

That still doesn't solve the dependency issue with ../node-icu-charset-detector.cpp:7:28: fatal error: unicode/ucsdet.h: No such file or directory, but that doesn't seem to stop it from working.

Now, I don't know how that would work with the new Dynos, since I'm not willing to test it, but if anyone has any ideas, that would be helpful.

@lokal-profil
Copy link

Trying to upgrade my instance of anon on heroku I also ran into the Error R10 (Boot timeout) issue.

Apart from making Procfile specify worker I had to manually go to the heroku dashboard and set turn off the web dyno and turn on the worker dyno (since heroku ps:scale worker=1) now triggers a question about credit cards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment