I am an Engineering Physics graduate from IIT Guwahati, but merely not restricted to Physics itself. In the past few years, I involved in many Cybersecurity blogging and now on Open-source.
Hey, in Heroku the most important part is to add necessary plugins, build packs and ENV variables. I will list those names here.
Plugins/add-ons:
Postgress
Redis
Build packs(order is important):
Nodejs
Ruby
PGBouncer
ENV(must configure variables):
APP_DOMAIN=#name of your Heroku app without https
APP_PROTOCOL=https://
HONEYBADGER_API_KEY=#create an account
FOREM_OWNER_SECRET=#some random password
SECRET_KEY_BASE=#use "rake secret" to get this random string
Few points to remember
Forem got rid of Elasticsearch, so any old users, it is easy and monetarily best to configure Forem in Heroku, if you are in US or UK. For others Dokku can be taken as second option. I'm actually writing a separate article on both these, so keep a watch on it
Imgproxy is also a important installation, many people even forgot its existence while configuring Heroku, so if that is the case please add Cloudinary plugin/addon in Heroku
Following all these will give you a working Forem in Heroku but if you are using free plan, it will crash in a minute or two. At least I you can reach till hear think of getting standard tier of Heroku.
I am an Engineering Physics graduate from IIT Guwahati, but merely not restricted to Physics itself. In the past few years, I involved in many Cybersecurity blogging and now on Open-source.
I've done what you said but there is no change. On Heroku, I've assigned all .env variables and Buildpacks in correct order, it shows me the error message below:
NoMethodError: undefined method `protocol' for nil:NilClass
I've forked forem on github and used GitHub connection as a deployment method. Then, I deployed it manually by using the "Manuel Deploy" section on Heroku.
I've also add Tier-1 dynos, Standard-0 Postgresqland Premium-0 Redis Add-ons.
I am an Engineering Physics graduate from IIT Guwahati, but merely not restricted to Physics itself. In the past few years, I involved in many Cybersecurity blogging and now on Open-source.
I am an Engineering Physics graduate from IIT Guwahati, but merely not restricted to Physics itself. In the past few years, I involved in many Cybersecurity blogging and now on Open-source.
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.
I am an Engineering Physics graduate from IIT Guwahati, but merely not restricted to Physics itself. In the past few years, I involved in many Cybersecurity blogging and now on Open-source.
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.
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)
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.
For further actions, you may consider blocking this person and/or reporting abuse
Hey, in Heroku the most important part is to add necessary plugins, build packs and ENV variables. I will list those names here.
Plugins/add-ons:
Build packs(order is important):
ENV(must configure variables):
Few points to remember
Following all these will give you a working Forem in Heroku but if you are using free plan, it will crash in a minute or two. At least I you can reach till hear think of getting standard tier of Heroku.
Thank you for your reply Akhil, should I add the env variables on Heroku Config Vars section or just .env file?
In Heroku
I've done what you said but there is no change. On Heroku, I've assigned all .env variables and Buildpacks in correct order, it shows me the error message below:
NoMethodError: undefined method `protocol' for nil:NilClass
def self.local_image(image_name, host: nil)
host ||= ActionController::Base.asset_host || url(nil)
ActionController::Base.helpers.image_url(image_name, host: host)
end
I've forked forem on github and used GitHub connection as a deployment method. Then, I deployed it manually by using the "Manuel Deploy" section on Heroku.
I've also add Tier-1 dynos, Standard-0 Postgresqland Premium-0 Redis Add-ons.
What do I do wrong?
Did you added honeybadger api keys? And https?
Ofcourse. I've added an image below. You can see all filled variables.
forem.dev/remoteimages/uploads/art...
If you have a few minutes and share your main e-mail address here, I can add you as an owner on Heroku. If you can help, I will be so grateful.
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.
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?
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.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)
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.
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.