mirror of
https://github.com/azaion/admin.git
synced 2026-06-21 10:41:09 +00:00
3a925b9b0f
- Deleted the `POST /resources/get/{dataFolder?}` and `GET /resources/get-installer` endpoints as part of the architectural shift towards simplified resource management.
- Removed associated methods and configurations, including `ResourcesService.GetEncryptedResource`, `ResourcesService.GetInstaller`, and related properties in `ResourcesConfig`.
- Cleaned up environment variables and configuration files to reflect the removal of installer-related settings.
- Eliminated the `GetResourceRequest` DTO and its validator, along with the `WrongResourceName` error code.
- Updated documentation to clarify the changes in resource handling and the retirement of per-user file encryption.
Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
2.0 KiB
Markdown
43 lines
2.0 KiB
Markdown
# Environment Strategy
|
|
|
|
## Environments
|
|
|
|
| Environment | Infrastructure | Config Source | Swagger |
|
|
|-------------|---------------|---------------|---------|
|
|
| Development | Local machine | appsettings.json / env vars | Enabled |
|
|
| Production | Linux server (self-hosted) | Environment variables | Disabled |
|
|
|
|
## Configuration
|
|
|
|
### appsettings.json Defaults
|
|
- `ResourcesConfig`: ResourcesFolder=`"Content"` (the `SuiteInstallerFolder` / `SuiteStageInstallerFolder` keys were removed in cycle 2 along with the installer endpoints)
|
|
- `JwtConfig`: Issuer=`"AzaionApi"`, Audience=`"Annotators/OrangePi/Admins"`, TokenLifetimeHours=`4`
|
|
- `ConnectionStrings` and `JwtConfig.Secret` are NOT in appsettings — must be provided via environment variables
|
|
|
|
Configuration is loaded via ASP.NET Core's `IConfiguration` with the following sections:
|
|
|
|
| Section | Purpose | Example Env Var |
|
|
|---------|---------|----------------|
|
|
| `ConnectionStrings.AzaionDb` | Reader DB connection | `ASPNETCORE_ConnectionStrings__AzaionDb` |
|
|
| `ConnectionStrings.AzaionDbAdmin` | Admin DB connection | `ASPNETCORE_ConnectionStrings__AzaionDbAdmin` |
|
|
| `JwtConfig.Secret` | JWT signing key | `ASPNETCORE_JwtConfig__Secret` |
|
|
| `JwtConfig.Issuer` | Token issuer | — |
|
|
| `JwtConfig.Audience` | Token audience | — |
|
|
| `JwtConfig.TokenLifetimeHours` | Token TTL | — |
|
|
| `ResourcesConfig.ResourcesFolder` | File storage root | — |
|
|
|
|
## Infrastructure Scripts (`env/`)
|
|
|
|
| Directory | Purpose |
|
|
|-----------|---------|
|
|
| `env/db/` | PostgreSQL install, role creation, schema DDL, migrations |
|
|
| `env/api/` | API server setup (Nginx reverse proxy, container management) |
|
|
| `env/rabbit/` | RabbitMQ install + config (not used by this API) |
|
|
| `env/cdn/` | MinIO object storage setup (not used by this API) |
|
|
|
|
## Database
|
|
|
|
- PostgreSQL on custom port 4312 (security through obscurity)
|
|
- Three DB roles: `azaion_superadmin` (owner), `azaion_admin` (read/write), `azaion_reader` (read-only)
|
|
- Schema managed via SQL scripts, no ORM migrations
|