Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the appsettings.json to be defined via env variable CONFIG_DIR #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

csobrinho
Copy link

This makes the usage via docker/kubernetes much easier since we can split the code and the data making the last one persisted in a volume.

Example:

  • Set the env CONFIG_DIR to /app/data
  • All code is inside /app
  • database and config is inside /app/data
  • a new volume is mounted for /app/data

Docker Image for ARM64: https://github.com/csobrinho/binner-docker
Kubernetes app: https://github.com/csobrinho/homelab/tree/main/apps/binner/overlays/prod

PS: My C# is rusty so please double-check both the syntax and codestyle fits, thanks!

This makes the usage via docker/kubernetes much easier since we can split the code and the data making the last one persisted in a volume.

Example:
`CONFIG_DIR="/app/data"`
- All code is inside `/app`
- database and config is inside `/app/data`
- a new volume is mounted for `/app/data`

Thanks!
@replaysMike
Copy link
Owner

Thanks for this, containerizing has been on my todo list for a while. I'll take a look at this today

@csobrinho
Copy link
Author

No worries, I have a docker container (for arm64 but could be made for several archs) here: https://github.com/csobrinho/binner-docker/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants