Add deploy tooling, docs, and Aspire config

This commit is contained in:
Holden
2026-06-20 14:33:53 -05:00
parent 95751904fa
commit 942bb4c80b
10 changed files with 349 additions and 3 deletions

95
README.md Normal file
View File

@@ -0,0 +1,95 @@
# TenWholeYears.Server
Server for the TenWholeYears Game Client. A decompilation of the first public Rec Room build.
## Basic Setup
Prerequisites:
- .NET 10 SDK
- Docker Desktop or another container runtime, when using `AppHost`
- A Steam Web API key, if using platform validation.
Restore and build:
```powershell
dotnet restore RecNet.sln
dotnet build RecNet.sln
```
Run the full local stack with Aspire:
```powershell
dotnet run --project src\AppHost\AppHost.csproj
```
## Configuration
Use user secrets for local development.
For the API:
```powershell
dotnet user-secrets set "Jwt:Secret" "replace-with-a-long-random-secret" --project src\API\API.csproj
```
Optional API secrets:
```powershell
dotnet user-secrets set "Jwt:Issuer" "http://localhost:5155" --project src\API\API.csproj
dotnet user-secrets set "Jwt:Audience" "TenWholeYears" --project src\API\API.csproj
dotnet user-secrets set "Jwt:ExpiryMinutes" "60" --project src\API\API.csproj
dotnet user-secrets set "Steam:ApiKey" "your-steam-web-api-key" --project src\API\API.csproj
dotnet user-secrets set "Steam:AppId" "480" --project src\API\API.csproj
dotnet user-secrets set "Neutrino:ValidateSecret" "true" --project src\API\API.csproj
dotnet user-secrets set "Neutrino:Secret" "replace-with-neutrino-secret" --project src\API\API.csproj
dotnet user-secrets set "RecNet:UseForwardedHeaders" "false" --project src\API\API.csproj
```
## Production Config With Environment Variables
.env example:
```powershell
Jwt__Secret = "replace-with-a-long-random-secret"
Jwt__Issuer = "https://your-api.example.com"
Jwt__Audience = "TenWholeYears"
Jwt__ExpiryMinutes = "60"
Steam__ApiKey = "your-steam-web-api-key"
Steam__AppId = "480"
Neutrino__ValidateSecret = "true"
Neutrino__Secret = "replace-with-neutrino-secret"
RecNet__UseForwardedHeaders = "true"
```
## Runtime Server Configs
The server has configs in the `ServerConfigs` database table that are able to be adjusted while the server is running. Keys are strings and values are stored as JSON.
| Key | Type | Default |
| --- | --- | --- |
| `Config:MOTD` | `string` | `"Ten Whole Years!"` |
| `Profiles:IgnoreAuthValidation` | `boolean` | `true` |
| `Profiles:NameGen` | object | `DefaultNameGenConfig.Value` |
`Profiles:NameGen` expects this shape:
```json
{
"Adjectives": [
"Adorable",
"Brave"
],
"Nouns": [
"Pony",
"Tiger"
]
}
```
## Notes
- Set `RecNet:UseForwardedHeaders` to `true` only when the API is behind a trusted reverse proxy.