-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(es) config-overrides-with-env-var.md (#1026)
Co-authored-by: ShadowNet <tony931023@gmail.com>
- Loading branch information
1 parent
eecfa24
commit cb6c6e3
Showing
2 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Sobrescritura de Configuración con Variables de Entorno | ||
|
||
Las variables de entorno pueden sobrescribir los valores de configuración. | ||
|
||
Por defecto, el núcleo escuchará los valores de configuración en este orden: | ||
|
||
``` | ||
1. Variables de entorno | ||
2. Archivo .conf | ||
3. Valores base definidos en el núcleo | ||
``` | ||
|
||
Las claves de las variables de entorno se generan automáticamente en base a las claves definidas en el archivo .conf. | ||
|
||
```cpp | ||
// Ejemplo de conversiones: | ||
// SomeConfig => SOME_CONFIG | ||
// myNestedConfig.opt1 => MY_NESTED_CONFIG_OPT_1 | ||
// LogDB.Opt.ClearTime => LOG_DB_OPT_CLEAR_TIME | ||
// GM.InGMList.Level => AC_GM_IN_GMLIST_LEVEL | ||
``` | ||
|
||
## Ejemplo de uso | ||
|
||
**Unix:** | ||
```sh | ||
$ export AC_DATA_DIR=/usr | ||
$ AC_WORLD_SERVER_PORT=8080 ./worldserver | ||
``` | ||
|
||
**Windows:** | ||
```ps | ||
> $env:AC_REALM_ID = '2'; .\worldserver | ||
``` |