viernes, 8 de noviembre de 2013

Deploying an airbnb rendr app in Heroku



Welcome to the second post about Rendr. In the following steps we are gonna see how to setup a Rendr app to upload it to Heroku. So less talking and more doing:

  1. In the root directory we have to create a file called Procfile. Inside this file we have to write the following line:
  2. 1:  web: node index.js  
  3. Then we modify Gruntfile.js, also in the root directory. Inside this file, at the bottom, we have to add the highlighted line:
  4. 0:    ... 
    1:   // Default task(s).  
    2:    grunt.registerTask('default', ['compile']);  
    3:    grunt.registerTask('heroku:', ['compile']);  
    4:   };  
    
  5.  Due to the fact that we can't compile assets, templates and styles in the Heroku server, we have to compile those files in our workstation (running sudo grunt ) and then add them to the Heroku commit.
  6. Upload all the files to Heroku and wait the start-up process.
  7. Listo ;)
PS: If the dyno didn't start run : heroku  ps:scale web=1

I hope you find it useful.
@sdemians

No hay comentarios:

Publicar un comentario