Make more things work with docker compose
This commit is contained in:
		
							parent
							
								
									6b8992153a
								
							
						
					
					
						commit
						e1ec790ddf
					
				| @ -11,8 +11,6 @@ | ||||
|     <PackageReference Include="AspNetCore.HealthChecks.Uris" /> | ||||
|     <PackageReference Include="Google.Protobuf" /> | ||||
|     <PackageReference Include="Grpc.AspNetCore.Server.ClientFactory" /> | ||||
|     <PackageReference Include="Grpc.Net.Client" /> | ||||
|     <PackageReference Include="Grpc.Net.ClientFactory" /> | ||||
|     <PackageReference Include="Grpc.Tools" PrivateAssets="All" /> | ||||
|   </ItemGroup> | ||||
| 
 | ||||
|  | ||||
| @ -12,9 +12,6 @@ | ||||
|     <Content Update="appsettings.json"> | ||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||
|     </Content> | ||||
|     <Content Update="wwwroot;"> | ||||
|       <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> | ||||
|     </Content> | ||||
|     <Content Include="Pics\**\*;"> | ||||
|       <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> | ||||
|     </Content> | ||||
| @ -50,14 +47,4 @@ | ||||
|     <ProjectReference Include="..\..\..\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj" /> | ||||
|     <ProjectReference Include="..\..\Services.Common\Services.Common.csproj" /> | ||||
|   </ItemGroup> | ||||
| 
 | ||||
|   <ItemGroup> | ||||
|     <None Update="Pics\*"> | ||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||
|     </None> | ||||
|     <None Update="Setup\*"> | ||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||
|     </None> | ||||
|   </ItemGroup> | ||||
| 
 | ||||
| </Project> | ||||
|  | ||||
| @ -31,15 +31,14 @@ public class PicController : ControllerBase | ||||
| 
 | ||||
|         if (item != null) | ||||
|         { | ||||
|             var webRoot = _env.WebRootPath; | ||||
|             var path = Path.Combine(webRoot, item.PictureFileName); | ||||
|             var path = Path.Combine(_env.ContentRootPath, "Pics", item.PictureFileName); | ||||
| 
 | ||||
|             string imageFileExtension = Path.GetExtension(item.PictureFileName); | ||||
|             string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension); | ||||
| 
 | ||||
|             var buffer = await System.IO.File.ReadAllBytesAsync(path); | ||||
| 
 | ||||
|             return File(buffer, mimetype); | ||||
|             return PhysicalFile(path, mimetype); | ||||
|         } | ||||
| 
 | ||||
|         return NotFound(); | ||||
|  | ||||
| @ -23,12 +23,6 @@ if (!await app.CheckHealthAsync()) | ||||
| 
 | ||||
| app.UseServiceDefaults(); | ||||
| 
 | ||||
| app.UseFileServer(new FileServerOptions | ||||
| { | ||||
|     FileProvider = new PhysicalFileProvider(Path.Combine(app.Environment.ContentRootPath, "Pics")), | ||||
|     RequestPath = "/pics" | ||||
| }); | ||||
| 
 | ||||
| app.MapGet("/", () => Results.Redirect("/swagger")); | ||||
| 
 | ||||
| app.MapControllers(); | ||||
|  | ||||
| @ -44,7 +44,7 @@ services: | ||||
|       - ASPNETCORE_URLS=http://0.0.0.0:80 | ||||
|       - SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104 | ||||
|       - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback | ||||
|       - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - ConnectionStrings__IdentityDb=${ESHOP_AZURE_IDENTITY_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 | ||||
|       - BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 | ||||
|       - OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102 | ||||
| @ -62,13 +62,12 @@ services: | ||||
|     environment: | ||||
|       - ASPNETCORE_ENVIRONMENT=Development | ||||
|       - ASPNETCORE_URLS=http://0.0.0.0:80 | ||||
|       - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basketdata} | ||||
|       - ConnectionStrings__Redis=${ESHOP_AZURE_REDIS_BASKET_DB:-basketdata} | ||||
|       - ConnectionStrings__EventBus=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - Identity__Url=http://identity-api | ||||
|       - Identity__ExternalUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 | ||||
|       - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - AzureServiceBusEnabled=False | ||||
|       - EventBus__UserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBus__Password=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} | ||||
|       - OrchestratorType=${ORCHESTRATOR_TYPE} | ||||
|       - UseLoadTest=${USE_LOADTEST:-False} | ||||
| @ -82,15 +81,14 @@ services: | ||||
|   catalog-api: | ||||
|     environment: | ||||
|       - ASPNETCORE_ENVIRONMENT=Development | ||||
|       - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - ConnectionStrings__CatalogDb=${ESHOP_AZURE_CATALOG_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - ConnectionStrings__EventBus=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - PicBaseUrl=${ESHOP_STORAGE_CATALOG_URL} | ||||
|       - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - EventBus__UserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBus__Password=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} | ||||
|       - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} | ||||
|       - UseCustomizationData=True | ||||
|       - AzureServiceBusEnabled=False | ||||
|       - AzureStorageEnabled=False | ||||
|       - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} | ||||
|       - OrchestratorType=${ORCHESTRATOR_TYPE} | ||||
| @ -105,12 +103,12 @@ services: | ||||
|     environment: | ||||
|       - ASPNETCORE_ENVIRONMENT=Development | ||||
|       - ASPNETCORE_URLS=http://0.0.0.0:80 | ||||
|       - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - ConnectionStrings__OrderingDb=${ESHOP_AZURE_ORDERING_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - ConnectionStrings__EventBus=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - Identity__Url=http://identity-api | ||||
|       - Identity__ExternalUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 | ||||
|       - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - EventBus__UserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBus__Password=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - UseCustomizationData=True | ||||
|       - AzureServiceBusEnabled=False | ||||
|       - CheckUpdateTime=30000 | ||||
| @ -128,10 +126,10 @@ services: | ||||
|     environment: | ||||
|       - ASPNETCORE_ENVIRONMENT=Development | ||||
|       - ASPNETCORE_URLS=http://0.0.0.0:80 | ||||
|       - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - ConnectionStrings__OrderingDb=${ESHOP_AZURE_ORDERING_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - ConnectionStrings__EventBus=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBus__UserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBus__Password=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - UseCustomizationData=True | ||||
|       - AzureServiceBusEnabled=False | ||||
|       - CheckUpdateTime=30000 | ||||
| @ -146,9 +144,9 @@ services: | ||||
|     environment: | ||||
|       - ASPNETCORE_ENVIRONMENT=Development | ||||
|       - ASPNETCORE_URLS=http://0.0.0.0:80 | ||||
|       - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - ConnectionStrings__EventBus=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBus__UserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBus__Password=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - AzureServiceBusEnabled=False | ||||
|       - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} | ||||
|       - OrchestratorType=${ORCHESTRATOR_TYPE} | ||||
| @ -159,10 +157,10 @@ services: | ||||
|     environment: | ||||
|       - ASPNETCORE_ENVIRONMENT=Development | ||||
|       - ASPNETCORE_URLS=http://0.0.0.0:80 | ||||
|       - ConnectionString=${ESHOP_AZURE_WEBHOOKS_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.WebhooksDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - ConnectionStrings__WebhooksDb=${ESHOP_AZURE_WEBHOOKS_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.WebhooksDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} | ||||
|       - ConnectionStrings__EventBus=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBus__UserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBus__Password=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - Identity__Url=http://identity-api | ||||
|       - Identity__ExternalUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 | ||||
|     ports: | ||||
| @ -226,13 +224,13 @@ services: | ||||
|     environment: | ||||
|       - ASPNETCORE_ENVIRONMENT=Development | ||||
|       - ASPNETCORE_URLS=http://0.0.0.0:80 | ||||
|       - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - ConnectionStrings__EventBus=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} | ||||
|       - EventBus__UserName=${ESHOP_SERVICE_BUS_USERNAME} | ||||
|       - EventBus__Password=${ESHOP_SERVICE_BUS_PASSWORD} | ||||
|       - AzureServiceBusEnabled=False | ||||
|       - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} | ||||
|       - OrchestratorType=${ORCHESTRATOR_TYPE} | ||||
|       - identityUrl=http://identity-api | ||||
|       - Identity__Url=http://identity-api | ||||
|     ports: | ||||
|       - "5112:80" | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user