Use .env for all configs

This commit is contained in:
lumijiez
2025-06-06 00:08:22 +03:00
parent bddb6ada87
commit 47f1b77584
4 changed files with 15 additions and 33 deletions

View File

@@ -17,6 +17,14 @@ AUTH0_SCOPE=openid profile email
AUTH0_DOMAIN=https://dev-example1234.us.auth0.com/ AUTH0_DOMAIN=https://dev-example1234.us.auth0.com/
APP_BASE_URL=https://example.com APP_BASE_URL=https://example.com
# ASP.NET Core Configuration
ASPNETCORE_ENVIRONMENT=Development
ASPNETCORE_URLS=http://+:8080
ASPNETCORE_LOGGING_LEVEL_DEFAULT=Information
ASPNETCORE_LOGGING_LEVEL=Information
ASPNETCORE_LOGGING_LEVEL_EFCORE=Information
ASPNETCORE_APPLY_MIGRATIONS_AT_STARTUP=true
# Frontend Configuration # Frontend Configuration
NEXT_PUBLIC_API_URL=https://example.com/api NEXT_PUBLIC_API_URL=https://example.com/api
NEXT_PUBLIC_AUTH0_DOMAIN=auth.example.com NEXT_PUBLIC_AUTH0_DOMAIN=auth.example.com

View File

@@ -6,11 +6,15 @@ services:
expose: expose:
- "80" - "80"
environment: environment:
- ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT}
- ConnectionStrings__DefaultConnection=Server=${SQL_SERVER};Database=${SQL_DATABASE};User Id=${SQL_USER_ID};Password=${SQL_PASSWORD};Encrypt=false;TrustServerCertificate=true;MultipleActiveResultSets=true; - ConnectionStrings__DefaultConnection=Server=${SQL_SERVER};Database=${SQL_DATABASE};User Id=${SQL_USER_ID};Password=${SQL_PASSWORD};Encrypt=false;TrustServerCertificate=true;MultipleActiveResultSets=true;
- ASPNETCORE_URLS=http://+:8080 - ASPNETCORE_URLS=${ASPNETCORE_URLS}
- Auth0__Authority=${AUTH0_DOMAIN} - Auth0__Authority=${AUTH0_DOMAIN}
- Auth0__Audience=${AUTH0_AUDIENCE} - Auth0__Audience=${AUTH0_AUDIENCE}
- Logging__LogLevel__Default=${ASPNETCORE_LOGGING_LEVEL_DEFAULT}
- Logging__LogLevel__Microsoft.AspNetCore=${ASPNETCORE_LOGGING_LEVEL}
- Logging__LogLevel__Microsoft.EntityFrameworkCore=${ASPNETCORE_LOGGING_LEVEL_EFCORE}
- DatabaseOptions__ApplyMigrationsAtStartup=${ASPNETCORE_APPLY_MIGRATIONS_AT_STARTUP}
depends_on: depends_on:
- mssql - mssql
networks: networks:
@@ -23,7 +27,7 @@ services:
- ./webui:/app - ./webui:/app
- /app/node_modules - /app/node_modules
ports: ports:
- "3000:3000" - "3000"
environment: environment:
- NODE_ENV=development - NODE_ENV=development
- AUTH0_SECRET=${AUTH0_SECRET} - AUTH0_SECRET=${AUTH0_SECRET}

View File

@@ -1,15 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Debug",
"Microsoft.EntityFrameworkCore": "Information"
}
},
"ConnectionStrings": {
"DefaultConnection": ""
},
"DatabaseOptions": {
"ApplyMigrationsAtStartup": true
}
}

View File

@@ -1,15 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Debug",
"Microsoft.EntityFrameworkCore": "Information"
}
},
"ConnectionStrings": {
"DefaultConnection": ""
},
"DatabaseOptions": {
"ApplyMigrationsAtStartup": true
}
}