|
| 1 | +# Environmental Variable Reference |
| 2 | + |
| 3 | +Environmental variables are used to configure core behaviors/configurations of the server software. |
| 4 | + |
| 5 | +The configurations are exposed as environmental variables rather than config files or registry keys to provide maximum support for wherever the server is hosted. |
| 6 | +Config files don't work well in serverless environments where the state should not change, and the registry is only available on Windows. |
| 7 | +Serverless, Windows, and Linux all share a common option: Environmental Variables. This works equally well across all of them. |
| 8 | + |
| 9 | +Below is a list of all environmental variable configurations that the server can use. There are data format examples and descriptions so that you are not going blind to what a config can look like and does. |
| 10 | + |
| 11 | +The title of the section is the name of the environmental variable. |
| 12 | + |
| 13 | +For authentication configuration, please see here for more environmental variables that are supported by SUS via the Microsoft Authentication Library for Node.JS [@azure/identity](https://www.npmjs.com/package/@azure/identity#environment-variables){:target="_blank"}. |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## `SUS_TenantId` |
| 18 | + |
| 19 | +- Mandatory: `true` |
| 20 | +- Expected string format: GUID |
| 21 | +- Allowed values: GUID |
| 22 | +- Default Value: `00000000-0000-0000-0000-000000000000` |
| 23 | +- Description: Tenant ID of the tenant that the app considers home/authenticates to. Defaults to NULL if not defined and should be overridden during authentication engine start. |
| 24 | + |
| 25 | +## `SUS_DB_Host` |
| 26 | + |
| 27 | +- Mandatory: `false` |
| 28 | +- Expected string format: string |
| 29 | +- Allowed values: string |
| 30 | +- Default Value: `localhost` |
| 31 | +- Description: Host name of the Azure SQL DB that should be used for storing simple data. |
| 32 | + |
| 33 | +## `SUS_DB_Name` |
| 34 | + |
| 35 | +- Mandatory: `false` |
| 36 | +- Expected string format: string |
| 37 | +- Allowed values: string |
| 38 | +- Default Value: `UrlShortener` |
| 39 | +- Description: Name of the DB to access and use for relational data storage. This is necessary for Azure SQL DBs as the DB has to be created ahead of time and shouldn't be created inline as a best practice. |
| 40 | + |
| 41 | +## `SUS_Debug` |
| 42 | + |
| 43 | +- Mandatory: `false` |
| 44 | +- Expected string format: boolean |
| 45 | +- Allowed values: true |
| 46 | +- Default Value: `false` |
| 47 | +- Description: Flag that indicates if the API service should be in debug mode. |
| 48 | + |
| 49 | +## `SUS_Headless` |
| 50 | + |
| 51 | +- Mandatory: `false` |
| 52 | +- Expected string format: boolean |
| 53 | +- Allowed values: true |
| 54 | +- Default Value: `false` |
| 55 | +- Description: Flag that indicates the system should run with no user interface render. |
| 56 | + |
| 57 | +## `SUS_LocalDb` |
| 58 | + |
| 59 | +- Mandatory: `false` |
| 60 | +- Expected string format: boolean |
| 61 | +- Allowed values: true |
| 62 | +- Default Value: `false` |
| 63 | +- Description: Flag that indicates the SQLite should be used for the ORM. All other functions are untouched. |
| 64 | + |
| 65 | +## `SUS_Local` |
| 66 | + |
| 67 | +- Mandatory: `false` |
| 68 | +- Expected string format: boolean |
| 69 | +- Allowed values: true |
| 70 | +- Default Value: `false` |
| 71 | +- Description: Flag that controls if the server should run with local resources only. This uses SQLite and prevents external resource calls allowing for a true local only execution experience. |
| 72 | + |
| 73 | +## `SUS_DefaultTarget` |
| 74 | + |
| 75 | +- Mandatory: `false` |
| 76 | +- Expected string format: URL |
| 77 | +- Allowed values: URL |
| 78 | +- Default Value: `https://shi.com` |
| 79 | +- Description: Location that the service will redirect to if a match is not found. |
| 80 | + |
| 81 | +## `SUS_AuthAudience` |
| 82 | + |
| 83 | +- Mandatory: `true` |
| 84 | +- Expected string format: GUID |
| 85 | +- Allowed values: GUID |
| 86 | +- Default Value: `00000000-0000-0000-0000-000000000000` |
| 87 | +- Description: Application ID of the app registration to use as the audience value in the access token validation. Not mandatory if in debug mode as auth is not enforced in debug mode. |
| 88 | + |
| 89 | +## `SUS_Test` |
| 90 | + |
| 91 | +- Mandatory: `false` |
| 92 | +- Expected string format: boolean |
| 93 | +- Allowed values: true |
| 94 | +- Default Value: `false` |
| 95 | +- Description: Flag that indicates if the application should have special behavior based on if the system is running through automated QA. |
0 commit comments