Forem Creators and Builders 🌱

Discussion on: Can someone share his/her .env and docker-compose.yml files?

 
akhil profile image
Akhil Naidu • Edited

Did you updated the Forem to the latest version. If not first update it.

Whatever is the case, from the ENV screenshot you have sent I was not able to see one of the critical environmental variable for any Production, i.e., SECRET_KEY_BASE.

Thread Thread
 
ce7in profile image
Muhammed Cetin

How can I create a SECRET_KEY_BASE on Heroku. I think it is created by the command "rake credentials:edit". There is a way to do that on Heroku?

Thread Thread
 
akhil profile image
Akhil Naidu

You can get SECRET_KEY_BASE value, by executing the command rake secret within the Heroku machine (in Heroku terminal). Usually there are two ways to do it.

  1. You can install Heroku cli within your local PC and can directly access Heroku bash from your local terminal. (But if you are beginner, I suggest you to check the second option)

  2. If you are only familiar with Heroku through GUI, this is best suited for them. With in you app settings, at the top right corner you can see an option "More". Upon clicking on more you can now see a menu list which contains an option to access terminal, i.e., "run console". Clicking on run console will pop up a window to run Heroku commands. Within this type the command "bash" and press on "run", this will give access to Heroku bash/terminal.

Ta..da.., using one of above the two procedures you can access Heroku Terminal.

Once you have access to Heroku Terminal, just run the command, rake secret. This will result in providing you with a randomly generated string. Now you can use this randomly generated string as the value to your SECRET_KEY_BASE environmental variable.