Retry Secret JWT Key
Some checks failed
Optimized Build and Deploy / remote-build-and-deploy (push) Failing after 4m10s
Some checks failed
Optimized Build and Deploy / remote-build-and-deploy (push) Failing after 4m10s
This commit is contained in:
@@ -58,6 +58,7 @@ jobs:
|
||||
# 3. Despliegue con Docker Compose
|
||||
cd /opt/gestion-integral
|
||||
export DB_SA_PASSWORD='${{ secrets.DB_SA_PASSWORD_SECRET }}'
|
||||
export JWT_KEY=${{ secrets.JWT_KEY }}'
|
||||
|
||||
echo "Recreando servicios..."
|
||||
docker compose up -d --force-recreate
|
||||
|
||||
@@ -114,7 +114,7 @@ var jwtSettings = builder.Configuration.GetSection("Jwt");
|
||||
|
||||
// Le decimos que busque la clave JWT en la raíz de la configuración (donde están las variables de entorno).
|
||||
// Si no la encuentra, como respaldo, busca en la sección "Jwt" del appsettings.
|
||||
var jwtKey = builder.Configuration["JWT_KEY"] ?? jwtSettings["Key"] ?? throw new ArgumentNullException("JWT_KEY or Jwt:Key not configured");
|
||||
var jwtKey = builder.Configuration["JWT_KEY"] ?? /*jwtSettings["Key"] ??*/ throw new ArgumentNullException("JWT_KEY or Jwt:Key not configured");
|
||||
|
||||
var keyBytes = Encoding.ASCII.GetBytes(jwtKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user