Error when deploy adonis app on heroku

I think that might answer your question :

2 Likes

Thanks @CrBast

@romain.lanz
http://adonisjs.com/docs/4.0/configuration-and-env#_disabling_env_file

I have tried the above one but, no use still getting the same issue.

Adonis needs APP_KEY to be defined as an environment variable.

  1. Generate one in your local terminal with adonis key:generate

  2. Open your .env file. You should now have APP_KEY=hM6Dw7upoPA7gFHZShefy539oFq2n2KC inside.

  3. Read this to learn how to add environment variables to Heroku. Add the APP_KEY environment variable.

3 Likes

Thanks @ LeCoupa
Its working
I have already APP_KEY in .env file
just i run this command, its working

heroku config:set APP_KEY= <your Adonis APP_KEY> 

Thanks a lot

2 Likes

Yes, I don’t think Heroku is reading the .env file. Always define your environment variable in production with:

heroku config:set ...
1 Like