TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How do you manage app secrets?

3 pointsby humilityover 5 years ago
In a web application, there are so many secrets to be managed - db passwords, jwt secrets, session secrets, etc.. what's a good strategy to manage them? I don't imagine committing them to version control is a good idea?

1 comment

jeremijaover 5 years ago
I usually have a base config file that&#x27;s committed and serves as an example or for developing with local services that I (or any other dev) can run easily via docker compose. Additionally, any setting can be overridden with an appropriate environment variable.<p>For test&#x2F;production environments I have a separate config file that is not committed to the repository.<p>Continuous integration tools like GitLab CI, Drone CI, and I believe Travis CI have support for application secrets so that can be used for automated deployment. Alternatively, these config files can live on the servers.<p>Some automation tools like Ansible have the ability to encrypt the secrets so they can be pushed to the repository, but I&#x27;ve never done it. Docker swarm also has support for defining secrets, and I&#x27;m sure Kubernetes does too.