Logic on properly deploying things
So I've been getting into a more professional workflow (id say) with better github practices, working with containers and orchestrators and such
But now that I don't "manually" deploy my programs onto a server anymore, I got a question about my config files
For example if I make a discord bot I wouldn't hardcode the details but rather make the bot create a folder for itself for things like the database it needs to run or the config for me to put the bot token into
How would I go on about giving the token to the bot for example, do I just ship the config file and folder with the image or is there some other workflow
13 Replies
You would use a secret store
Like Azure Key Vault, for example
But wouldn't that need some authentication too which would mean I'd need to somehow supply my program with the keystore?
You can store that in the secrets in the GH repo, and use that to set the env variable or something inside of your GH action
I guess you could directly just do that with the Discord token or whatever, but using something like KeyVault lets you change the secrets without the need for a redeploy
I mean I don't really mind the redeploy tbh
Skip KV, then
Can you go more into detail about storing them inside of the repo?

Perfect
I'll have a look, thanks!
Here's how I deploy one of my Nuget packages, for example

${{ secrets.NUGET_KEY }}
references that secretHow would I be able to access those secrets using my program once deployed?
You would set them on the server during deployment
Either by creating a file with env variables, editing the project settings, or just setting an env variable on the server
Aight