Browse Source

🚑 Docker镜像设置时区

pull/27/head
王军 5 years ago
parent
commit
63b7ed2cba
  1. 3
      .gitignore
  2. 3
      aspnet-core/gateways/Lion.AbpPro.WebGateway/Dockerfile
  3. 48
      aspnet-core/gateways/Lion.AbpPro.WebGateway/appsettings.Production.json
  4. 2
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Dockerfile
  5. 61
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Production.json
  6. 3
      aspnet-core/services/host/Lion.AbpPro.IdentityServer/Dockerfile
  7. 13
      aspnet-core/services/host/Lion.AbpPro.IdentityServer/appsettings.Production.json

3
.gitignore

@ -274,3 +274,6 @@ vben271/yarn.lock
/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/logs
/aspnet-core/services/host/Lion.AbpPro.IdentityServer/Logs
/aspnet-core/services/host/Lion.AbpPro.IdentityServer/Logs
/aspnet-core/gateways/Lion.AbpPro.WebGateway/appsettings.Production.json
/aspnet-core/services/host/Lion.AbpPro.IdentityServer/appsettings.Production.json
/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Production.json

3
aspnet-core/gateways/Lion.AbpPro.WebGateway/Dockerfile

@ -11,6 +11,9 @@ WORKDIR /app
# 暴露80端口
EXPOSE 80
# 设置时区 .net6 才有这个问题
ENV TZ=Asia/Shanghai
# 设置环境变量
ENV ASPNETCORE_ENVIRONMENT=Production

48
aspnet-core/gateways/Lion.AbpPro.WebGateway/appsettings.Production.json

@ -1,48 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"App": {
"SelfUrl": "http://120.24.194.14:8014",
"CorsOrigins": "http://localhost:4200,http://120.24.194.14:8012,http://120.24.194.14:8011,http://120.24.194.14:8013"
},
"GlobalConfiguration": {
},
"Routes": [
{
"DownstreamPathTemplate": "/{url}",
"DownstreamScheme": "http",
"ServiceName": "AbpPro-Service",
"LoadBalancerOptions": {
"Type": "LeastConnection"
},
"UpstreamPathTemplate": "/gateway/{url}",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
]
},
{
"DownstreamPathTemplate": "/{url}",
"DownstreamScheme": "ws",
"ServiceName": "AbpPro-Service",
"LoadBalancerOptions": {
"Type": "LeastConnection"
},
"UpstreamPathTemplate": "/ws/{url}",
"UpstreamHttpMethod": [
"Get",
"Post",
"Put",
"Delete"
]
}
]
}

2
aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Dockerfile

@ -10,6 +10,8 @@ WORKDIR /app
# 暴露80端口
EXPOSE 80
# 设置时区 .net6 才有这个问题
ENV TZ=Asia/Shanghai
# 设置环境变量
ENV ASPNETCORE_ENVIRONMENT=Production

61
aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Production.json

@ -1,61 +0,0 @@
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Information",
"Volo.Abp": "Information",
"Hangfire": "Information",
"DotNetCore.CAP": "Information",
"Serilog.AspNetCore": "Information"
}
}
},
"App": {
"SelfUrl": "http://120.24.194.14:8011",
"CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:3100,http://120.24.194.14:8012,http://120.24.194.14:8011,http://120.24.194.14:8013"
},
"ConnectionStrings": {
"Default": "Data Source=mysql;Database=LionAbpProDB20211106;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
},
"Redis": {
"Configuration": "redis,password=1q2w3E*,defaultdatabase=1"
},
"Jwt": {
"Audience": "LionAbpPro",
//客户端标识
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=",
"Issuer": "LionAbpPro",
//签发者
"ExpirationTime": 24
//过期时间 hour
},
"Cap": {
"Enabled": "true",
"RabbitMq": {
"HostName": "rabbitMq",
"UserName": "admin",
"Password": "1q2w3E*"
}
},
"LogToElasticSearch": {
"Enabled": "false",
"ElasticSearch": {
"Url": "http://es.cn",
"IndexFormat": "companyname.projectname.development",
"UserName": "elastic",
"Password": "aVVhjQ95RP7nbwNy",
"DashboardIndex": "companyname.projectname"
}
},
"HttpClient": {
"Sts": {
"Url": "http://120.24.194.14:8013"
}
},
"Consul": {
"Enabled": true,
"Host": "http://consul:8500",
"Service": "AbpPro-Service"
}
}

3
aspnet-core/services/host/Lion.AbpPro.IdentityServer/Dockerfile

@ -11,6 +11,9 @@ WORKDIR /app
# 暴露80端口
EXPOSE 80
# 设置时区 .net6 才有这个问题
ENV TZ=Asia/Shanghai
# 设置环境变量
ENV ASPNETCORE_ENVIRONMENT=Production

13
aspnet-core/services/host/Lion.AbpPro.IdentityServer/appsettings.Production.json

@ -1,13 +0,0 @@
{
"App": {
"SelfUrl": "http://120.24.194.14:8013",
"CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,https://localhost:44307,https://localhost:44315,http://120.24.194.14:8012,http://120.24.194.14:8011,http://120.24.194.14:8013"
},
"ConnectionStrings": {
"Default": "Data Source=mysql;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
},
"Redis": {
"Configuration": "redis,password=1q2w3E*,defaultdatabase=1"
}
}
Loading…
Cancel
Save