From 747e32dbfdce849f091de3de5acd2ec2df42d2bf Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Tue, 7 Dec 2021 13:44:15 +0800 Subject: [PATCH] chore: update docker-compose --- docker-compose.configuration.yml | 51 +------------------ docker-compose.override.yml | 22 ++------ docker-compose.yml | 9 +--- .../Dockerfile | 14 +++++ 4 files changed, 20 insertions(+), 76 deletions(-) create mode 100644 gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Dockerfile diff --git a/docker-compose.configuration.yml b/docker-compose.configuration.yml index 29e24a3d0..1edc577da 100644 --- a/docker-compose.configuration.yml +++ b/docker-compose.configuration.yml @@ -190,61 +190,12 @@ services: - IdentityServer__Clients__AuthApiGateway__ClientId=ApigatewayHostClient - IdentityServer__Clients__AuthApiGatewayAdmin__ClientId=apigateway-admin-client - apigateway-admin-service: + internat-apigateway: environment: - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=ApiGateway;User Id=root;Password=123456 - - ConnectionStrings__ApiGateway=Server=127.0.0.1;Database=ApiGateway;User Id=root;Password=123456 - - ConnectionStrings__AbpAuditLogging=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - Encryption__PassPhrase=s46c5q55nxpeS8Ra - Encryption__InitVector=s83ng0abvd02js84 - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=ApiGateway-Admin - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.ApiGateway - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - apigateway-host-service: - environment: - - ApiGateway__AppId=TEST-APP - - App__TrackingEntitiesChanged=true - - RemoteServices__ApiGateway__BaseUrl=http://127.0.0.1:30001/ - - RemoteServices__ApiGateway__IdentityClient=ApigatewayHostClient - - IdentityClients__ApigatewayHostClient__Authority=http://127.0.0.1:44385 - - IdentityClients__ApigatewayHostClient__RequireHttps=false - - IdentityClients__ApigatewayHostClient__GrantType=client_credentials - - IdentityClients__ApigatewayHostClient__ClientId=ApigatewayHostClient - - IdentityClients__ApigatewayHostClient__Scope=lingyun-abp-application - - IdentityClients__ApigatewayHostClient__ClientSecret=1q2w3e* - - EnabledDynamicOcelot=true - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__Abp__NotifyFailedCallback=true - - CAP__Abp__CleanUpExpiresMessageBatch=1000 - - CAP__Abp__CleanUpExpiresMessageInterval=3600000 - - CAP__EventBus__DefaultGroup=ApiGateway-Host - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.ApiGateway - - CAP__RabbitMQ__VirtualHost=/ - Redis__Configuration=127.0.0.1,defaultDatabase=10 - Redis__InstanceName=LINGYUN.Abp.Application - AuthServer__Authority=http://127.0.0.1:44385/ diff --git a/docker-compose.override.yml b/docker-compose.override.yml index c356c94d6..1ada24840 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -58,26 +58,12 @@ services: - identity-server-sts restart: always - apigateway-admin-service: + internat-apigateway: build: - context: ./aspnet-core/services/Publish/apigateway-admin + context: ./gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway volumes: - - /var/opt/abp/logs/apigateway-admin:/app/Logs - - /var/opt/abp/data/apigateway-admin/Modules:/app/Modules - depends_on: - - identity-server-sts - - admin-service - restart: always - - apigateway-host-service: - build: - context: ./aspnet-core/services/Publish/apigateway-host - volumes: - - /var/opt/abp/logs/apigateway-host:/app/Logs - - /var/opt/abp/data/apigateway-host/Modules:/app/Modules - depends_on: - - identity-server-sts - - apigateway-admin-service + - /var/opt/abp/logs/internat-apigateway:/app/Logs + - /var/opt/abp/data/internat-apigateway/Modules:/app/Modules restart: always volumes: diff --git a/docker-compose.yml b/docker-compose.yml index c4e1ca8f7..5e0eb6a42 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,14 +43,7 @@ services: ports: - "44385:80" - apigateway-admin-service: - environment: - - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 - ports: - - "30001:80" - - apigateway-host-service: + internat-apigateway: environment: - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:80 diff --git a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Dockerfile b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Dockerfile new file mode 100644 index 000000000..aef4da831 --- /dev/null +++ b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/dotnet/aspnet:5.0 +LABEL maintainer="colin.in@foxmail.com" +WORKDIR /app + +COPY . /app + +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone + +EXPOSE 80/tcp +VOLUME [ "./app/Logs" ] +VOLUME [ "./app/Modules" ] + +ENTRYPOINT ["dotnet", "LINGYUN.MicroService.Internal.ApiGateway.dll"] \ No newline at end of file