It is hardly possible to hide secret keys from an attacker who could gain access to your server, because the server needs to know the keys. But you can make it difficult for an attacker with low privileges.
Obfuscation is not usually considered good practice.
Your option 5 seems reasonable. Storing keys in a file that is not controlled by the source allows you to store keys in one and a specific place. You can set appropriate permissions for this file so that an attacker needs high privileges to open it. Also make sure that editing the rest of the project requires high privileges, otherwise the attacker could modify a random project file to access the keys.
I myself use your option 5 in my projects.
source share