Comments (5)
Elo, using environment variables for loading config options has been implemented in the v2 version of moonlight (more information about v2, see our discord server). v2 builds are not available in this development state
You can set values using the json structure of the config.json.
e.g. the config looks like that:
{ "AppUrl": "http://localhost:5132", ... "Store": { "Currency": "$" }, ... }
You can set the currency using the env var: Moonlight_Store_Currency
If the type of the value is e.g. a integer or a boolean moonlight tries automatically to parse it and ignores the variable if unable to do so.
I hope you are happy with this implementation. If you have any feedback about it, feel free to give feedback ^^
from moonlight.
Hey hey, thanks for you feature request. The storage folder is essential for some moonlight features (e.g. log files and custom images). I can make it that you can pass the configuration file content, so the whole json, as an environment variable. Would you be okay with this way of implementing it or do you have a better idea which i can integrate?
from moonlight.
Love the panel, great work!
Passing the whole json as an environment variable would be a big step up for me from the current methods.
Alternatively, I think its preferable, though more work, to expose each config setting manually as environment variables. This is how most container-first applications I've deployed take their configuration. So for moonlight panel you could have the settings exposed with env variables like -
MOONLIGHT_DATABASE__DATABASE
MOONLIGHT_DATABASE__HOST
MOONLIGHT_DATABASE__PASSWORD
MOONLIGHT_LETSENCRYPT__ENABLE
This has the advantage of being able to individually set settings directly in my manifests (e.g. this docker-compose.yml for pterodactyl) which are then kept in source control. My deployment method (fluxcd) makes it very easy to pull individual secrets from vault and set them as env variables in containers. It's possible to do substitution within a template e.g. the config.json but significantly more effort, and requires maintaining the json template somewhere in source. Some of the other benefits of config as env are detailed here.
from moonlight.
Hey hey,
the Moonlight__Something
way of implementing config options looks like the best solution and will be implemented in Moonlight v2 (the current version i am working on. For more information, join in discord. Link in docs).
from moonlight.
Awesome, thank you!
from moonlight.
Related Issues (20)
- [Feature Request] User "Notes"
- [V2] Some first bugs i encountered HOT 2
- V2 Early Access - some installer cosmetics HOT 3
- Could not find color or style 'Enter'. HOT 1
- Autosetup Daemon use email [email protected] HOT 5
- Database error on Setup HOT 1
- Parsing error when daemon is not installed in a EN locale HOT 1
- Craches and Node Setup Problems HOT 10
- V2EA/Deleting an image is not possible HOT 1
- Database HOT 3
- Event System? HOT 1
- Missing dotnet package in some versions of ubuntu HOT 1
- Incubator error HOT 8
- Panel cannot connect to the database HOT 6
- Console output random HOT 14
- Admin Dashboard Links are wrong HOT 3
- Server online detection does not work for the first line after start HOT 8
- Unable to load shared library 'Mono.Unix' or one of its dependencies. HOT 2
- Server archiving not working properly on large files HOT 2
- Updates in Admin Dashboard HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moonlight.