docs(hosting): use flags instead of env vars

This commit is contained in:
Dustin Stiles 2025-03-24 13:57:55 -04:00
parent 703a9e7238
commit 9ea34cf622
Signed by: duwstiles
GPG Key ID: BCD9912EC231FC87

View File

@ -64,20 +64,19 @@ the project globally. This can be done with the following command:
go run koti.casa/numenorlabs/dsfx/cmd/dsfx@main
```
## Environment Variables
## Configuration
DSFX uses the following environment variables to configure its behavior:
The application accepts the following cli flags:
| Variable | Description | Default Value |
| --------------- | ----------------------------------------------------------- | ---------------- |
| DSFX_HOST | The host on which the DSFX server will run | 0.0.0.0 |
| DSFX_PORT | The port on which the DSFX server will listen | 8000 |
| DSFX_LOG_LEVEL | The log level to use. One of (error, warn, info, debug) | info |
| DSFX_DATA_DIR | The directory where the DSFX data files are stored | /etc/dsfx/data |
| DSFX_CONFIG_DIR | The directory where the DSFX configuration files are stored | /etc/dsfx/config |
- **-h**: Show help message
- **-host**: The host on which the DSFX server will run (default: `0.0.0.0`)
- **-port**: The port on which the DSFX server will listen (default: `8000`)
- **-logLevel**: The log level to use. One of (error, warn, info, debug) (default: `info`)
- **-dataDir**: The directory where the DSFX data files are stored (default: `/etc/dsfx/data`)
- **-configDir**: The directory where the DSFX configuration files are stored (default: `/etc/dsfx/config`)
## Local Files
The DSFX server uses local files for configuration and storage. The default directories for these
files are specified in the `DSFX_CONFIG_DIR` and `DSFX_DATA_DIR` environment variables. You can
change these directories by setting the corresponding environment variables before starting the server.
files are specified in the **-configDir** and **-dataDir** cli flags. You can
change these directories by specifying the flags when you run the server.