Skip to content

Commit 1576e90

Browse files
committed
Updated README and optional options
1 parent 4cd22ad commit 1576e90

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

Configs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public record MessagingConfig(string ConnectionString);
4444
/// <param name="RedirectUrl">The redirect URL for unmatched requests to the server</param>
4545
/// <param name="MachineName">The machine name</param>
4646
public record EnvironmentConfig(
47-
string Hostname,
47+
string? Hostname,
4848
bool IsProd,
4949
string Storage,
5050
string? RedirectUrl = null,

Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
using MassTransit;
2222
using MassTransit.SqlTransport.PostgreSql;
2323
using Microsoft.AspNetCore.Diagnostics;
24-
using Microsoft.AspNetCore.HttpOverrides;
2524
using Microsoft.AspNetCore.Mvc;
2625
using Microsoft.IdentityModel.Tokens;
2726
using RobotsTxt;
@@ -114,7 +113,7 @@
114113
builder.Services.AddSingleton(KVPSButter.KVPSLoader.CreateIKVPS(envConfig.Storage));
115114

116115
Log.Logger = logConfiguration
117-
.Enrich.WithProperty("Hostname", envConfig.Hostname)
116+
.Enrich.WithProperty("Hostname", envConfig.Hostname ?? Environment.MachineName)
118117
.Enrich.WithProperty("MachineName", envConfig.MachineName)
119118
.Enrich.WithProperty("IsProd", envConfig.IsProd)
120119
.CreateLogger();

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,31 @@ The ingress server is intended to have very few moving parts and generally just
2020

2121
---
2222

23+
## Required environment variables
24+
25+
| Variable | Description |
26+
| ----------------------------- | --------------------------------------------------------------------- |
27+
| ENVIRONMENT\_\_ISPROD | Production environment flag (false indicates development environment) |
28+
| ENVIRONMENT\_\_STORAGE | KVPSButter connection string for report storage |
29+
| MESSAGING\_\_CONNECTIONSTRING | PostgreSQL connection string for connecting to the message bus |
30+
| ENCRYPTIONKEY\_\_??? | One or more encryption keys for encrypting backup reports |
31+
| INGRESS\_\_JWT\_\_AUTHORITY | The authority that issued the JWT token (must match issuer config) |
32+
| INGRESS\_\_JWT\_\_AUDIENCE | The audience for the JWT token (must match issuer config) |
33+
| INGRESS\_\_JWT\_\_SIGNINGKEY | The signing key for the JWT token (must match issuers config) |
34+
35+
## Optional environment variables
36+
37+
The following environment variables are optional, and should be considered for a production deployment:
38+
39+
| Variable | Description |
40+
| -------------------------------- | ----------------------------------------------------------------------------- |
41+
| ENVIRONMENT\_\_HOSTNAME | The server hostname for logging purposes |
42+
| ENVIRONMENT\_\_MACHINENAME | Name of the machine for logging purposes |
43+
| ENVIRONMENT\_\_REDIRECTURL | Url to redirect to when visiting the root path |
44+
| PRECONFIGUREDTOKENS\_\_STORAGE | The KVPSButter connection string to the storage that contains an IP blacklist |
45+
| PRECONFIGUREDTOKENS\_\_WHITELIST | The key that contains the IP blacklist |
46+
| PRECONFIGUREDTOKENS\_\_BLACKLIST | The key that contains the IP blacklist |
47+
2348
## Setting Up Local Development Environment
2449

2550
This project uses environment variables to configure the application during startup.

0 commit comments

Comments
 (0)