Added Docker to server
This commit is contained in:
12
src/Server/Dockerfile
Normal file
12
src/Server/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
RUN dotnet restore ./Server.csproj
|
||||
RUN dotnet publish ./Server.csproj -c Release -o /output
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
|
||||
WORKDIR /app
|
||||
COPY --from=build /output .
|
||||
ENV ASPNETCORE_ENVIRONMENT Docker
|
||||
EXPOSE 5146
|
||||
ENTRYPOINT [ "./Server" ]
|
||||
41
src/Server/appsettings.Docker.json
Normal file
41
src/Server/appsettings.Docker.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"Kestrel":{
|
||||
"Endpoints": {
|
||||
"http":{
|
||||
"Url": "http://0.0.0.0:5146"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UseSwagger": true,
|
||||
"Embeddingsearch": {
|
||||
"ConnectionStrings": {
|
||||
"SQL": "server=localhost;database=embeddingsearch;uid=embeddingsearch;pwd=somepassword!;"
|
||||
},
|
||||
"Elmah": {
|
||||
"AllowedHosts": [
|
||||
"127.0.0.1",
|
||||
"::1",
|
||||
"172.17.0.1"
|
||||
]
|
||||
},
|
||||
"AiProviders": {
|
||||
"ollama": {
|
||||
"handler": "ollama",
|
||||
"baseURL": "http://localhost:11434"
|
||||
},
|
||||
"localAI": {
|
||||
"handler": "openai",
|
||||
"baseURL": "http://localhost:8080",
|
||||
"ApiKey": "Some API key here"
|
||||
}
|
||||
},
|
||||
"ApiKeys": ["Some UUID here", "Another UUID here"],
|
||||
"UseHttpsRedirection": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user