lihaodyx 3 years ago
parent
commit
0dd154e078

+ 1 - 2
source/gx_api/.gitignore

@@ -257,5 +257,4 @@ paket-files/
 .cr/
 
 *.pubxml
-/GxPress/Api/GxPress.Api/wwwroot/cache
-*.json
+/GxPress/Api/GxPress.Api/wwwroot/cache

+ 73 - 0
source/gx_api/GxPress/Api/GxPress.Api/appsettings.Development.json

@@ -0,0 +1,73 @@
+{
+  //日志
+  "Serilog": {
+    "MinimumLevel": {
+      "Default": "Debug",
+      "Override": {
+        "Microsoft": "Information",
+        "System": "Information"
+      }
+    },
+    "WriteTo": [
+      {
+        "Name": "Console",
+        "Args": {
+          "theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console",
+          "outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} <s:{SourceContext}>{NewLine}{Exception}"
+        }
+      },
+      {
+        "Name": "File",
+        "Args": {
+          //文件路径
+          "path": "log/log.log",
+          //文件滚动方式
+          "rollingInterval": "Day",
+          //消息输出格式
+          "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}",
+          //文件数量
+          "retainedFileCountLimit": 60,
+          //使用缓冲,提高写入效率
+          "buffered": true
+        }
+      }
+    ]
+  },
+  "JwtOptions": {
+    //秘钥(至少16位)
+    "Key": "GxPress.com.cnP@ssw0rd",
+    //发行商
+    "Issuer": "http://www.GxPress.com.cn/",
+    //订阅者
+    "Audience": "http://www.GxPress.com.cn/",
+    //有效期
+    "Expires": 14
+  },
+  // 数据库
+  "Database": {
+    "DatabaseType": "MySql",
+    "ConnectionString": "Server=47.95.221.96;Uid=root;Pwd=siteservercms88;Database=ccpph;SslMode=Preferred;CharSet=utf8"
+  },
+  // Redis Cache
+  "Cache": {
+    "ConnectionString": "localhost:6379,password=,defaultDatabase=0"
+  },
+  //  Storage
+  //   endpoint:
+  //     Location of the server, supports HTTP and HTTPS
+  //
+  //   accessKey:
+  //     Access Key for authenticated requests (Optional, can be omitted for anonymous
+  //     requests)
+  //
+  //   secretKey:
+  //     Secret Key for authenticated requests (Optional, can be omitted for anonymous
+  //     requests)
+  "Storage": {
+    "StorageType": "minio",
+    "Endpoint": "",
+    "AccessKey": "",
+    "SecretKey": "",
+    "SSL": false
+  }
+}

+ 73 - 0
source/gx_api/GxPress/Api/GxPress.Api/appsettings.json

@@ -0,0 +1,73 @@
+{
+  //日志
+  "Serilog": {
+    "MinimumLevel": {
+      "Default": "Debug",
+      "Override": {
+        "Microsoft": "Information",
+        "System": "Information"
+      }
+    },
+    "WriteTo": [
+      {
+        "Name": "Console",
+        "Args": {
+          "theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console",
+          "outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} <s:{SourceContext}>{NewLine}{Exception}"
+        }
+      },
+      {
+        "Name": "File",
+        "Args": {
+          //文件路径
+          "path": "log/log.log",
+          //文件滚动方式
+          "rollingInterval": "Day",
+          //消息输出格式
+          "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}",
+          //文件数量
+          "retainedFileCountLimit": 60,
+          //使用缓冲,提高写入效率
+          "buffered": true
+        }
+      }
+    ]
+  },
+  "JwtOptions": {
+    //秘钥(至少16位)
+    "Key": "GxPress.com.cnP@ssw0rd",
+    //发行商
+    "Issuer": "http://www.GxPress.com.cn/",
+    //订阅者
+    "Audience": "http://www.GxPress.com.cn/",
+    //有效期
+    "Expires": 14
+  },
+  // 数据库
+  "Database": {
+    "DatabaseType": "MySql",
+    "ConnectionString": "Server=47.95.221.96;Uid=root;Pwd=siteservercms88;Database=ccpph;SslMode=Preferred;CharSet=utf8"
+  },
+  // Redis Cache
+  "Cache": {
+    "ConnectionString": "localhost:6379,password=,defaultDatabase=0"
+  },
+  //  Storage
+  //   endpoint:
+  //     Location of the server, supports HTTP and HTTPS
+  //
+  //   accessKey:
+  //     Access Key for authenticated requests (Optional, can be omitted for anonymous
+  //     requests)
+  //
+  //   secretKey:
+  //     Secret Key for authenticated requests (Optional, can be omitted for anonymous
+  //     requests)
+  "Storage": {
+    "StorageType": "minio",
+    "Endpoint": "",
+    "AccessKey": "",
+    "SecretKey": "",
+    "SSL": false
+  }
+}