I have a Rails app on a production server and an .rb
file where I do this:
Rails.configuration.my_sect = if Rails.env.development? || Rails.env.test?
{
secret_key: 'some_secrete',
public_key: 'some_public'
}
else
{
secret_key: ENV['key1'],
public_key: ENV['key2']
}
end
The application is on a Linux server. What's the best place to put the values of those secret_key
and public_key
on the server so ENV['key1']
and ENV['key2']
can always be accessible?
I don't want to use any gem or Capistrano.