3 ms·
Even if #4 is possible (I rather doubt it), you shouldn't really do that. It breaks the barrier between code and configuration by making the former influence th
by Xion 14y ago
Even if #4 is possible (I rather doubt it), you shouldn't really do that. It breaks the barrier between code and configuration by making the former influence the latter.
Such approach is simply not scalable. I don't know what secret_token.rb is (I do Python) but if it's anything like an HMAC key for encrypting your session cookies, your app will break once deployed to more than one frontend because the cookies will suddenly become tied to specific dyno.
- deleted 14y ago[deleted]
- thisone 14y ago4 is possible. You run the app locally using foreman, store your local variables in a .env file, and add that to your gitignore. For your heroku running app, you use the toolbelt to add env variables. https://devcenter.heroku.com/articles/config-vars#local-setup https://devcenter.heroku.com/articles/config-vars#local-setu... https://devcenter.heroku.com/articles/config-vars#setting-up-config-vars-for-a-deployed-application https://devcenter.heroku.com/articles/config-vars#setting-up...
- josephlord 14y agoYes it is for the session cookies. You are right that it won't work well for multiple frontend servers but that isn't going to be an issue for this current app. If it is written to the Heroku environment it should be available to all dynes I think. I can rethink the solution if I need scale. I don't really think of it as config as I don't care what the value is just that it is consistent on any given host.