From 5da5a0edea9cc239c6ad0fd234adfc788448845e Mon Sep 17 00:00:00 2001 From: dmolinari Date: Thu, 19 Jun 2025 11:37:40 -0300 Subject: [PATCH] Test cambio de usuario en archivo Docker del backend --- .gitea/workflows/deploy.yml | 6 ++++++ Backend/GestionIntegral.Api/Dockerfile | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 781ea37..1fc7c77 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -63,6 +63,12 @@ jobs: cd /opt/gestion-integral # Gitea reemplaza los secretos aquí. Es seguro. export DB_SA_PASSWORD='${{ secrets.DB_SA_PASSWORD_SECRET }}' + # Detener explícitamente los servicios para forzar a que usen la nueva imagen al levantar. + echo "--- (HOST) Stopping old services... ---" + docker compose down + + # Levantar los servicios. Docker Compose usará las imágenes recién cargadas. + echo "--- (HOST) Starting new services... ---" docker compose up -d # --- PARTE 4: LIMPIEZA (EN EL HOST) --- diff --git a/Backend/GestionIntegral.Api/Dockerfile b/Backend/GestionIntegral.Api/Dockerfile index c025405..3887bc3 100644 --- a/Backend/GestionIntegral.Api/Dockerfile +++ b/Backend/GestionIntegral.Api/Dockerfile @@ -30,12 +30,7 @@ WORKDIR /app # La imagen mcr.microsoft.com/dotnet/aspnet:9.0 está basada en Debian. # Necesitamos instalar libgdiplus para que System.Drawing y el motor de reportes funcionen. -# Cambiamos temporalmente a usuario root para instalar paquetes. -USER root RUN apt-get update && apt-get install -y libgdiplus libc6-dev && rm -rf /var/lib/apt/lists/* -# Volvemos al usuario por defecto de la aplicación (usualmente 'app'). -# Si tu imagen no define un usuario, esta línea puede ser opcional, pero es buena práctica. -USER app COPY --from=publish /app/publish .