Compare commits
	
		
			2 Commits
		
	
	
		
			1c193b68bb
			...
			developmen
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 37b9888532 | ||
| 6ec76fc975 | 
							
								
								
									
										12
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| **/bin | ||||
| **/obj | ||||
| **/out | ||||
| **/.vs | ||||
| **/.idea | ||||
| **/.git | ||||
| **/.gitignore | ||||
| **/node_modules | ||||
| *.user | ||||
| *.swp | ||||
| *.swo | ||||
| .DS_Store | ||||
| @@ -8,7 +8,7 @@ | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" /> | ||||
|     <PackageReference Include="Core.Blueprint.Logging" Version="1.0.1" /> | ||||
|     <PackageReference Include="Core.Blueprint.Logging" Version="1.0.0" /> | ||||
|     <PackageReference Include="OpenTelemetry" Version="1.12.0" /> | ||||
|     <PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.12.0" /> | ||||
|     <PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.4" /> | ||||
|   | ||||
| @@ -12,5 +12,6 @@ namespace Core.Inventory.External.Clients.Inventory.Requests.Base | ||||
|         public string? MaintenanceNotes { get; set; } | ||||
|         public DimensionsRequest Dimensions { get; set; } = new(); | ||||
|         public List<string>? VariantIds { get; set; } | ||||
|         public string Icon { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -14,5 +14,6 @@ namespace Core.Inventory.External.Clients.Inventory.Requests.Base | ||||
|         public string? MaintenanceNotes { get; set; } | ||||
|         public DimensionsRequest Dimensions { get; set; } = new(); | ||||
|         public List<string>? VariantIds { get; set; } | ||||
|         public string Icon { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -15,5 +15,6 @@ | ||||
|         public string ProviderId { get; set; } = string.Empty; | ||||
|  | ||||
|         public Dictionary<string, string> Attributes { get; set; } = []; | ||||
|         public string Icon { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -17,5 +17,6 @@ | ||||
|         public string ProviderId { get; set; } = string.Empty; | ||||
|  | ||||
|         public Dictionary<string, string> Attributes { get; set; } = new(); | ||||
|         public string Icon { get; set; } = null!; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -7,8 +7,8 @@ | ||||
|   </PropertyGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <PackageReference Include="Adapters.Lib" Version="1.0.13" /> | ||||
|     <PackageReference Include="BuildingBlocks.Library" Version="1.0.0" /> | ||||
|     <PackageReference Include="Core.Adapters.Lib" Version="1.0.1" /> | ||||
|     <PackageReference Include="Lib.Architecture.BuildingBlocks" Version="1.0.0" /> | ||||
|     <PackageReference Include="Refit" Version="8.0.0" /> | ||||
|   </ItemGroup> | ||||
|  | ||||
|   | ||||
							
								
								
									
										38
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| # ===== Build stage ===== | ||||
| FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||||
| WORKDIR /src | ||||
|  | ||||
| # Usar tu feed (BaGet) + nuget.org | ||||
| COPY nuget.config ./ | ||||
|  | ||||
| # Copiar SOLO los .csproj primero (mejor caché) | ||||
| COPY Core.Inventory.BFF.API/Core.Inventory.BFF.API.csproj Core.Inventory.BFF.API/ | ||||
| COPY Core.Inventory.External/Core.Inventory.External.csproj Core.Inventory.External/ | ||||
|  | ||||
| # Restore con tu nuget.config | ||||
| RUN dotnet restore Core.Inventory.BFF.API/Core.Inventory.BFF.API.csproj --configfile ./nuget.config | ||||
|  | ||||
| # Copiar el resto del código | ||||
| COPY . . | ||||
|  | ||||
| # Publicar artefactos | ||||
| ARG BUILD_CONFIGURATION=Release | ||||
| RUN dotnet publish Core.Inventory.BFF.API/Core.Inventory.BFF.API.csproj \ | ||||
|     -c $BUILD_CONFIGURATION -o /app/out /p:UseAppHost=false | ||||
|  | ||||
| # ===== Runtime stage ===== | ||||
| FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime | ||||
| WORKDIR /app | ||||
| COPY --from=build /app/out . | ||||
|  | ||||
| # Config base | ||||
| ENV ASPNETCORE_URLS=http://+:8080 \ | ||||
|     ASPNETCORE_ENVIRONMENT=Production | ||||
|  | ||||
| EXPOSE 8080 | ||||
|  | ||||
| # (Opcional) Healthcheck si tienes endpoint /health | ||||
| # HEALTHCHECK --interval=30s --timeout=5s --retries=5 \ | ||||
| #   CMD wget -qO- http://localhost:8080/health || exit 1 | ||||
|  | ||||
| ENTRYPOINT ["dotnet", "Core.Inventory.BFF.API.dll"] | ||||
							
								
								
									
										9
									
								
								nuget.config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								nuget.config
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <configuration> | ||||
|   <packageSources> | ||||
|     <!-- Tu BaGet primero --> | ||||
|     <add key="BaGet" value="https://nuget.dream-views.com/v3/index.json" protocolVersion="3" /> | ||||
|     <!-- NuGet oficial como fallback (si quieres) --> | ||||
|     <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||||
|   </packageSources> | ||||
| </configuration> | ||||
		Reference in New Issue
	
	Block a user