Where to store key files or certificates?

In General there are key files for third-party service.
In one of the projects was met as they were stored in the application root (in the folder).
Met to be stored in db/ssl/client.key
And in fact, as (can store keys in the environment variables) and where to store such files?
2 answers
June 5th 19 at 21:49
On production. Not in the repository.
not in the application you have in mind? - Joany22 commented on June 5th 19 at 21:52
and not in the app - Mohamed_Lind75 commented on June 5th 19 at 21:55
June 5th 19 at 21:51
In a special infrastructure repository in encrypted form.
In this repository you keep the scripts/manifests to configure your servers for the application.
You can read more ? - Joany22 commented on June 5th 19 at 21:54
, Ansible - Mohamed_Lind75 commented on June 5th 19 at 21:57

Find more questions by tags Digital certificatesRuby on RailsInformation security