update the docker file
This commit is contained in:
@@ -15,8 +15,12 @@ Env.Load("../.env");
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Configuration.AddEnvironmentVariables();
|
||||
|
||||
var jwtKey = builder.Configuration["Jwt:Key"]
|
||||
?? throw new InvalidOperationException("JWT Key is missing from configuration!");
|
||||
var jwtKey = builder.Configuration.GetValue<string>("Jwt:Key");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(jwtKey))
|
||||
{
|
||||
throw new InvalidOperationException("CRITICAL: JWT Key is missing or empty! Check your .env/Docker environment mapping.");
|
||||
}
|
||||
|
||||
var jwtIssuer = builder.Configuration["Jwt:Issuer"] ?? "SeasonedAPI";
|
||||
var jwtAudience = builder.Configuration["Jwt:Audience"] ?? "SeasonedFrontend";
|
||||
|
||||
@@ -25,9 +25,9 @@ services:
|
||||
environment:
|
||||
- GEMINI_API_KEY=${GEMINI_API_KEY}
|
||||
- NUXT_PUBLIC_API_BASE=${NUXT_PUBLIC_API_BASE}
|
||||
- Jwt__Key=${JWT__KEY}
|
||||
- Jwt__Issuer=${JWT__ISSUER}
|
||||
- Jwt__Audience=${JWT__AUDIENCE}
|
||||
- Jwt__Key=${JWT_KEY}
|
||||
- Jwt__Issuer=${JWT_ISSUER}
|
||||
- Jwt__Audience=${JWT_AUDIENCE}
|
||||
- ConnectionStrings__DefaultConnection=${ConnectionStrings__DefaultConnection}
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- ASPNETCORE_HTTP_PORTS=8080
|
||||
|
||||
Reference in New Issue
Block a user