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