修改docker

This commit is contained in:
xpnas 2021-03-27 00:51:26 +08:00
parent 8197856d3d
commit 38686d8128
3 changed files with 5 additions and 4 deletions

View File

@ -22,7 +22,7 @@ namespace Inotify.Data
private readonly Migrator m_migrator; private readonly Migrator m_migrator;
private readonly string m_dataPath = "im_data"; private readonly string m_dataPath = "inotify_data";
private readonly string m_jwtPath; private readonly string m_jwtPath;

View File

@ -1,7 +1,7 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
VOLUME ["/im_data"] VOLUME ["/inotify_data"]
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80
EXPOSE 443 EXPOSE 443

View File

@ -5,6 +5,7 @@ using Inotify.Sends;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Runtime.Caching;
using System.Text; using System.Text;
using System.Web; using System.Web;
@ -12,13 +13,13 @@ namespace Inotify.Sends
{ {
public class SendCacheStore public class SendCacheStore
{ {
private static readonly System.Runtime.Caching.MemoryCache m_cache; private static readonly MemoryCache m_cache;
private static readonly Dictionary<string, string> m_systemInfos; private static readonly Dictionary<string, string> m_systemInfos;
static SendCacheStore() static SendCacheStore()
{ {
m_cache = new System.Runtime.Caching.MemoryCache("CacheStore"); m_cache = new MemoryCache("CacheStore");
m_systemInfos = DBManager.Instance.DBase.Query<SystemInfo>().ToList().ToDictionary(e => e.key, e => e.Value); m_systemInfos = DBManager.Instance.DBase.Query<SystemInfo>().ToList().ToDictionary(e => e.key, e => e.Value);
} }