commit
98cada47db
13
dockerfiles/.env
Normal file
13
dockerfiles/.env
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# MongoDB Configuration
|
||||
ENV_MONGO_DB_HOST=botsharp_mongo
|
||||
ENV_MONGO_DB_PORT=27017
|
||||
ENV_MONGO_DB_DATABASE=botsharp
|
||||
ENV_MONGO_INITDB_ROOT_USERNAME=root
|
||||
ENV_MONGO_INITDB_ROOT_PASSWORD=admin
|
||||
ASPNETCORE_HTTP_PORTS=5500
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# stage 1: build
|
||||
FROM microsoft/dotnet AS botsharp-articulate
|
||||
WORKDIR /source
|
||||
|
||||
# copies the rest of your code
|
||||
COPY . .
|
||||
|
||||
# RUN dotnet build
|
||||
RUN dotnet publish BotSharp.WebHost/BotSharp.WebHost.csproj --configuration ARTICULATE --output /app
|
||||
|
||||
# copy Settings folder
|
||||
WORKDIR /app
|
||||
RUN mkdir App_Data/Projects
|
||||
|
||||
# stage 2: run
|
||||
ENTRYPOINT [ "dotnet", "BotSharp.WebHost.dll" ]
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# stage 1: build
|
||||
FROM microsoft/dotnet AS botsharp-dialogflow
|
||||
WORKDIR /source
|
||||
|
||||
# copies the rest of your code
|
||||
COPY . .
|
||||
|
||||
# RUN dotnet build
|
||||
RUN dotnet publish BotSharp.WebHost/BotSharp.WebHost.csproj --configuration DIALOGFLOW --output /app
|
||||
|
||||
# copy Settings folder
|
||||
WORKDIR /app
|
||||
RUN mkdir App_Data/Projects
|
||||
|
||||
# stage 2: run
|
||||
ENTRYPOINT [ "dotnet", "BotSharp.WebHost.dll" ]
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
# stage 1: build
|
||||
FROM microsoft/dotnet AS botsharp-rasa
|
||||
WORKDIR /source
|
||||
|
||||
# copies the rest of your code
|
||||
COPY . .
|
||||
|
||||
# RUN dotnet build
|
||||
RUN dotnet publish BotSharp.WebHost/BotSharp.WebHost.csproj --configuration RASA --output /app
|
||||
|
||||
# copy Settings folder
|
||||
WORKDIR /app
|
||||
RUN mkdir App_Data/Projects
|
||||
|
||||
# stage 2: run
|
||||
ENTRYPOINT [ "dotnet", "BotSharp.WebHost.dll" ]
|
||||
16
dockerfiles/Readme.md
Normal file
16
dockerfiles/Readme.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
## Run Container
|
||||
|
||||
# Prerequisites:
|
||||
1. Install Powershell
|
||||
2. Install Docker Environment
|
||||
|
||||
# start container
|
||||
|
||||
```
|
||||
run-docker-compose.ps1
|
||||
```
|
||||
|
||||
# stop container
|
||||
```
|
||||
stop-docker-compose.ps1
|
||||
```
|
||||
49
dockerfiles/WebStarter.Dockerfile
Normal file
49
dockerfiles/WebStarter.Dockerfile
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base
|
||||
USER app
|
||||
WORKDIR /app
|
||||
EXPOSE 5500
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["Directory.Build.props", "."]
|
||||
COPY ["src/WebStarter/WebStarter.csproj", "src/WebStarter/"]
|
||||
COPY ["tests/BotSharp.Plugin.PizzaBot/BotSharp.Plugin.PizzaBot.csproj", "tests/BotSharp.Plugin.PizzaBot/"]
|
||||
COPY ["src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj", "src/Infrastructure/BotSharp.Core/"]
|
||||
COPY ["src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj", "src/Infrastructure/BotSharp.Abstraction/"]
|
||||
COPY ["src/Infrastructure/BotSharp.Logger/BotSharp.Logger.csproj", "src/Infrastructure/BotSharp.Logger/"]
|
||||
COPY ["src/Infrastructure/BotSharp.OpenAPI/BotSharp.OpenAPI.csproj", "src/Infrastructure/BotSharp.OpenAPI/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.GoogleAI/BotSharp.Plugin.GoogleAI.csproj", "src/Plugins/BotSharp.Plugin.GoogleAI/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.MongoStorage/BotSharp.Plugin.MongoStorage.csproj", "src/Plugins/BotSharp.Plugin.MongoStorage/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.AzureOpenAI/BotSharp.Plugin.AzureOpenAI.csproj", "src/Plugins/BotSharp.Plugin.AzureOpenAI/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.ChatbotUI/BotSharp.Plugin.ChatbotUI.csproj", "src/Plugins/BotSharp.Plugin.ChatbotUI/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.HuggingFace/BotSharp.Plugin.HuggingFace.csproj", "src/Plugins/BotSharp.Plugin.HuggingFace/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.KnowledgeBase/BotSharp.Plugin.KnowledgeBase.csproj", "src/Plugins/BotSharp.Plugin.KnowledgeBase/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.MetaAI/BotSharp.Plugin.MetaAI.csproj", "src/Plugins/BotSharp.Plugin.MetaAI/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.MetaMessenger/BotSharp.Plugin.MetaMessenger.csproj", "src/Plugins/BotSharp.Plugin.MetaMessenger/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.Qdrant/BotSharp.Plugin.Qdrant.csproj", "src/Plugins/BotSharp.Plugin.Qdrant/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.RoutingSpeeder/BotSharp.Plugin.RoutingSpeeder.csproj", "src/Plugins/BotSharp.Plugin.RoutingSpeeder/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.WeChat/BotSharp.Plugin.WeChat.csproj", "src/Plugins/BotSharp.Plugin.WeChat/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.SemanticKernel/BotSharp.Plugin.SemanticKernel.csproj", "src/Plugins/BotSharp.Plugin.SemanticKernel/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.Twilio/BotSharp.Plugin.Twilio.csproj", "src/Plugins/BotSharp.Plugin.Twilio/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.TelegramBots/BotSharp.Plugin.TelegramBots.csproj", "src/Plugins/BotSharp.Plugin.TelegramBots/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.ChatHub/BotSharp.Plugin.ChatHub.csproj", "src/Plugins/BotSharp.Plugin.ChatHub/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.HttpHandler/BotSharp.Plugin.HttpHandler.csproj", "src/Plugins/BotSharp.Plugin.HttpHandler/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.LLamaSharp/BotSharp.Plugin.LLamaSharp.csproj", "src/Plugins/BotSharp.Plugin.LLamaSharp/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.SqlDriver/BotSharp.Plugin.SqlDriver.csproj", "src/Plugins/BotSharp.Plugin.SqlDriver/"]
|
||||
COPY ["src/Plugins/BotSharp.Plugin.WebDriver/BotSharp.Plugin.WebDriver.csproj", "src/Plugins/BotSharp.Plugin.WebDriver/"]
|
||||
RUN dotnet restore "./src/WebStarter/./WebStarter.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/src/WebStarter"
|
||||
RUN dotnet build "./WebStarter.csproj" -c $BUILD_CONFIGURATION -o /app/build /p:SolutionName=BotSharp
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "./WebStarter.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false /p:SolutionName=BotSharp
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "WebStarter.dll"]
|
||||
209
dockerfiles/appsettings.json
Normal file
209
dockerfiles/appsettings.json
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"AllowedOrigins": [
|
||||
"http://localhost:5015"
|
||||
],
|
||||
|
||||
"Jwt": {
|
||||
"Issuer": "botsharp",
|
||||
"Audience": "botsharp",
|
||||
"Key": "31ba6052aa6f4569901facc3a41fcb4adfd9b46dd00c40af8a753fbdc2b89869"
|
||||
},
|
||||
|
||||
"OAuth": {
|
||||
"GitHub": {
|
||||
"ClientId": "",
|
||||
"ClientSecret": ""
|
||||
},
|
||||
"Google": {
|
||||
"ClientId": "",
|
||||
"ClientSecret": ""
|
||||
},
|
||||
"Keycloak": {
|
||||
"BaseAddress": "http://keycloak.localhost:8080",
|
||||
"Realm": "master",
|
||||
"ClientId": "botsharp",
|
||||
"ClientSecret": "36FeOoyZzkOWrRZLmhwxplC2kGbFGn68",
|
||||
"Version": 22
|
||||
}
|
||||
},
|
||||
|
||||
"LlmProviders": [
|
||||
{
|
||||
"Provider": "azure-openai",
|
||||
"Models": [
|
||||
{
|
||||
"Name": "gpt-35-turbo",
|
||||
"ApiKey": "",
|
||||
"Endpoint": "https://ai4c-demo.openai.azure.com/",
|
||||
"Type": "chat",
|
||||
"PromptCost": 0.0015,
|
||||
"CompletionCost": 0.002
|
||||
},
|
||||
{
|
||||
"Name": "gpt-35-turbo-instruct",
|
||||
"ApiKey": "",
|
||||
"Endpoint": "https://gpt-35-turbo-instruct.openai.azure.com/",
|
||||
"Type": "text",
|
||||
"PromptCost": 0.0015,
|
||||
"CompletionCost": 0.002
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Provider": "llama-sharp",
|
||||
"Models": [
|
||||
{
|
||||
"Name": "llama-2-7b-guanaco-qlora.Q2_K.gguf",
|
||||
"Type": "chat"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Provider": "huggingface",
|
||||
"Models": [
|
||||
{
|
||||
"Name": "mistralai/Mistral-7B-v0.1",
|
||||
"Type": "text"
|
||||
},
|
||||
{
|
||||
"Name": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
||||
"Type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"Router": {
|
||||
},
|
||||
|
||||
"Evaluator": {
|
||||
"AgentId": "dfd9b46d-d00c-40af-8a75-3fbdc2b89869"
|
||||
},
|
||||
|
||||
"Agent": {
|
||||
"DataDir": "agents",
|
||||
"TemplateFormat": "liquid",
|
||||
"HostAgentId": "01e2fc5c-2c89-4ec7-8470-7688608b496c",
|
||||
"LlmConfig": {
|
||||
"Provider": "azure-openai",
|
||||
"Model": "gpt-35-turbo"
|
||||
}
|
||||
},
|
||||
|
||||
"Conversation": {
|
||||
"DataDir": "conversations",
|
||||
"ShowVerboseLog": false,
|
||||
"EnableLlmCompletionLog": false,
|
||||
"EnableExecutionLog": true,
|
||||
"EnableContentLog": true,
|
||||
"EnableStateLog": true
|
||||
},
|
||||
|
||||
"Statistics": {
|
||||
"DataDir": "stats"
|
||||
},
|
||||
|
||||
"LlamaSharp": {
|
||||
"Interactive": true,
|
||||
"ModelDir": "C:/Users/haipi/Downloads",
|
||||
"DefaultModel": "llama-2-7b-chat.Q8_0.gguf",
|
||||
"MaxContextLength": 1024,
|
||||
"NumberOfGpuLayer": 20
|
||||
},
|
||||
|
||||
"AzureOpenAi": {
|
||||
},
|
||||
|
||||
"GoogleAi": {
|
||||
"PaLM": {
|
||||
"Endpoint": "https://generativelanguage.googleapis.com",
|
||||
"ApiKey": ""
|
||||
}
|
||||
},
|
||||
|
||||
"HuggingFace": {
|
||||
"Endpoint": "https://api-inference.huggingface.co",
|
||||
"Model": "tiiuae/falcon-180B-chat",
|
||||
"Token": ""
|
||||
},
|
||||
|
||||
"MetaAi": {
|
||||
"fastText": {
|
||||
"ModelPath": "dbpedia.ftz"
|
||||
}
|
||||
},
|
||||
|
||||
"RoutingSpeeder": {
|
||||
},
|
||||
|
||||
"MetaMessenger": {
|
||||
"Endpoint": "https://graph.facebook.com",
|
||||
"ApiVersion": "v17.0",
|
||||
"PageId": "",
|
||||
"PageAccessToken": ""
|
||||
},
|
||||
|
||||
"Twilio": {
|
||||
"PhoneNumber": "+1",
|
||||
"AccountSID": "",
|
||||
"AuthToken": "",
|
||||
"CallbackHost": "https://",
|
||||
"AgentId": "01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a"
|
||||
},
|
||||
|
||||
"Database": {
|
||||
"Default": "MongoRepository",
|
||||
"TablePrefix": "BotSharp",
|
||||
"BotSharpMongoDb": "mongodb://root:admin@botsharp_mongo:27017/botsharp?authSource=admin&authMechanism=SCRAM-SHA-256",
|
||||
"FileRepository": "data",
|
||||
"Assemblies": [ "BotSharp.Core" ]
|
||||
},
|
||||
|
||||
"Qdrant": {
|
||||
"Url": "",
|
||||
"ApiKey": ""
|
||||
},
|
||||
|
||||
"WeChat": {
|
||||
"AgentId": "437bed34-1169-4833-95ce-c24b8b56154a",
|
||||
"Token": "#{Token}#",
|
||||
"EncodingAESKey": "#{EncodingAESKey}#",
|
||||
"WeixinAppId": "#{WeixinAppId}#",
|
||||
"WeixinAppSecret": "#{WeixinAppSecret}#"
|
||||
},
|
||||
|
||||
"KnowledgeBase": {
|
||||
"VectorDb": "MemVectorDatabase",
|
||||
"TextEmbedding": "fastTextEmbeddingProvider",
|
||||
"TextCompletion": "AzureOpenAI.Providers.TextCompletionProvider",
|
||||
"Pdf2TextConverter": "PigPdf2TextConverter"
|
||||
},
|
||||
|
||||
"PluginLoader": {
|
||||
"Assemblies": [
|
||||
"BotSharp.Core",
|
||||
"BotSharp.Logger",
|
||||
"BotSharp.Plugin.MongoStorage",
|
||||
"BotSharp.Plugin.Dashboard",
|
||||
"BotSharp.Plugin.AzureOpenAI",
|
||||
"BotSharp.Plugin.GoogleAI",
|
||||
"BotSharp.Plugin.MetaAI",
|
||||
"BotSharp.Plugin.MetaMessenger",
|
||||
"BotSharp.Plugin.HuggingFace",
|
||||
"BotSharp.Plugin.KnowledgeBase",
|
||||
"BotSharp.Plugin.Qdrant",
|
||||
"BotSharp.Plugin.ChatHub",
|
||||
"BotSharp.Plugin.WeChat",
|
||||
"BotSharp.Plugin.PizzaBot",
|
||||
"BotSharp.Plugin.WebDriver",
|
||||
"BotSharp.Plugin.LLamaSharp"
|
||||
]
|
||||
}
|
||||
}
|
||||
64
dockerfiles/botsharp.json
Normal file
64
dockerfiles/botsharp.json
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"clientId": "botsharp",
|
||||
"name": "botsharp 登陆",
|
||||
"description": "",
|
||||
"rootUrl": "http://localhost:5500",
|
||||
"adminUrl": "http://localhost:5500",
|
||||
"baseUrl": "http://localhost:5500",
|
||||
"surrogateAuthRequired": false,
|
||||
"enabled": true,
|
||||
"alwaysDisplayInConsole": true,
|
||||
"clientAuthenticatorType": "client-secret",
|
||||
"secret": "36FeOoyZzkOWrRZLmhwxplC2kGbFGn68",
|
||||
"redirectUris": [
|
||||
"http://localhost:5500/*"
|
||||
],
|
||||
"webOrigins": [
|
||||
"http://localhost:5500"
|
||||
],
|
||||
"notBefore": 0,
|
||||
"bearerOnly": false,
|
||||
"consentRequired": false,
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"serviceAccountsEnabled": false,
|
||||
"publicClient": false,
|
||||
"frontchannelLogout": true,
|
||||
"protocol": "openid-connect",
|
||||
"attributes": {
|
||||
"client.secret.creation.time": "1708154349",
|
||||
"oauth2.device.authorization.grant.enabled": "false",
|
||||
"backchannel.logout.revoke.offline.tokens": "false",
|
||||
"use.refresh.tokens": "true",
|
||||
"oidc.ciba.grant.enabled": "false",
|
||||
"backchannel.logout.session.required": "true",
|
||||
"client_credentials.use_refresh_token": "false",
|
||||
"tls.client.certificate.bound.access.tokens": "false",
|
||||
"require.pushed.authorization.requests": "false",
|
||||
"acr.loa.map": "{}",
|
||||
"display.on.consent.screen": "false",
|
||||
"token.response.type.bearer.lower-case": "false"
|
||||
},
|
||||
"authenticationFlowBindingOverrides": {},
|
||||
"fullScopeAllowed": true,
|
||||
"nodeReRegistrationTimeout": -1,
|
||||
"defaultClientScopes": [
|
||||
"web-origins",
|
||||
"acr",
|
||||
"profile",
|
||||
"roles",
|
||||
"email"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"address",
|
||||
"phone",
|
||||
"offline_access",
|
||||
"microprofile-jwt"
|
||||
],
|
||||
"access": {
|
||||
"view": true,
|
||||
"configure": true,
|
||||
"manage": true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
ui:
|
||||
image: botsharpdocker/botsharp-articulateui:0.1.0
|
||||
ports: ['0.0.0.0:3000:3000']
|
||||
networks: ['botsharp-network']
|
||||
environment:
|
||||
- rasanluendpoint=http://botsharp:7500
|
||||
|
||||
botsharp:
|
||||
image: botsharpdocker/botsharp-articulate:0.1.0
|
||||
ports: ['0.0.0.0:7500:7500']
|
||||
networks: ['botsharp-network']
|
||||
|
||||
|
||||
networks: {botsharp-network: {}}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
ui:
|
||||
image: samtecspg/articulate-ui:0.12.1
|
||||
ports: ['0.0.0.0:3000:3000']
|
||||
networks: ['botsharp-network']
|
||||
environment:
|
||||
- API_URL
|
||||
|
||||
api:
|
||||
image: samtecspg/articulate-api:0.12.1
|
||||
ports: ['0.0.0.0:7500:7500']
|
||||
networks: ['botsharp-network']
|
||||
entrypoint: ['node', 'start.js']
|
||||
environment:
|
||||
- SWAGGER_BASE_PATH
|
||||
|
||||
botsharp:
|
||||
image: botsharpdocker/botsharp-rasa:latest
|
||||
ports: ['0.0.0.0:5000:5000']
|
||||
networks: ['botsharp-network']
|
||||
|
||||
networks: {botsharp-network: {}}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
botsharp:
|
||||
image: botsharpdocker/botsharp-core:0.2.0
|
||||
ports: ['0.0.0.0:3112:3112']
|
||||
networks: ['botsharp-network']
|
||||
|
||||
networks: {botsharp-network: {}}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
ui:
|
||||
image: botsharpdocker/botsharp-rasaui:latest
|
||||
ports: ['0.0.0.0:5001:5001']
|
||||
networks: ['botsharp-network']
|
||||
environment:
|
||||
- rasanluendpoint=http://botsharp:5000
|
||||
|
||||
botsharp:
|
||||
image: botsharpdocker/botsharp-rasa:latest
|
||||
ports: ['0.0.0.0:5000:5000']
|
||||
networks: ['botsharp-network']
|
||||
|
||||
|
||||
networks: {botsharp-network: {}}
|
||||
31
dockerfiles/docker-compose.infrastructure.override.yml
Normal file
31
dockerfiles/docker-compose.infrastructure.override.yml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
mongodb:
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: ${ENV_MONGO_INITDB_ROOT_USERNAME}
|
||||
MONGO_INITDB_ROOT_PASSWORD: ${ENV_MONGO_INITDB_ROOT_PASSWORD}
|
||||
ports:
|
||||
- 27017:27017
|
||||
|
||||
keycloak.localhost:
|
||||
environment:
|
||||
- KEYCLOAK_ADMIN=admin
|
||||
- KEYCLOAK_ADMIN_PASSWORD=admin
|
||||
- KC_DB=postgres
|
||||
- KC_DB_URL_HOST=postgresql.localhost
|
||||
- KC_DB_URL_DATABASE=keycloak
|
||||
- KC_DB_PASSWORD=123456
|
||||
- KC_DB_USERNAME=keycloak
|
||||
- KC_DB_SCHEMA=public
|
||||
ports:
|
||||
- 8080:8080
|
||||
|
||||
postgresql.localhost:
|
||||
environment:
|
||||
# ALLOW_EMPTY_PASSWORD is recommended only for development.
|
||||
- POSTGRES_PASSWORD=123456
|
||||
- POSTGRESQL_USERNAME=keycloak
|
||||
- POSTGRESQL_DATABASE=keycloak
|
||||
ports:
|
||||
- 5432:5432
|
||||
37
dockerfiles/docker-compose.infrastructure.yml
Normal file
37
dockerfiles/docker-compose.infrastructure.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
mongodb:
|
||||
image: mongo:7.0-jammy
|
||||
container_name: botsharp_mongo
|
||||
volumes:
|
||||
- mongo7_data_7.0-jammy:/data/db
|
||||
networks:
|
||||
- botsharp-network
|
||||
|
||||
keycloak.localhost:
|
||||
image: quay.io/keycloak/keycloak:22.0.3
|
||||
command: start-dev
|
||||
container_name: keycloak.localhost
|
||||
depends_on:
|
||||
- postgresql.localhost
|
||||
networks:
|
||||
- botsharp-network
|
||||
|
||||
|
||||
postgresql.localhost:
|
||||
image: docker.io/bitnami/postgresql:16
|
||||
container_name: postgresql.localhost
|
||||
volumes:
|
||||
- postgres_data_16:/var/lib/postgresql/data
|
||||
networks:
|
||||
- botsharp-network
|
||||
|
||||
|
||||
volumes:
|
||||
mongo7_data_7.0-jammy:
|
||||
postgres_data_16:
|
||||
|
||||
networks:
|
||||
botsharp-network:
|
||||
external: true
|
||||
16
dockerfiles/docker-compose.yml
Normal file
16
dockerfiles/docker-compose.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
version: '3.0'
|
||||
|
||||
services:
|
||||
botsharp:
|
||||
image: botsharpdocker/botsharp-core:latest
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: dockerfiles/WebStarter.Dockerfile
|
||||
ports:
|
||||
- 5500:5500
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- ./appsettings.json:/app/appsettings.json
|
||||
networks:
|
||||
- botsharp-network
|
||||
2
dockerfiles/run-docker-compose.ps1
Normal file
2
dockerfiles/run-docker-compose.ps1
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
docker network create botsharp-network
|
||||
docker-compose -f docker-compose.yml -f docker-compose.infrastructure.yml -f docker-compose.infrastructure.override.yml up -d
|
||||
2
dockerfiles/stop-docker-compose.ps1
Normal file
2
dockerfiles/stop-docker-compose.ps1
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
docker-compose -f docker-compose.yml -f docker-compose.infrastructure.yml -f docker-compose.infrastructure.override.yml down
|
||||
docker network rm botsharp-network
|
||||
|
|
@ -18,8 +18,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
@ -39,8 +37,12 @@
|
|||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.26" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BotSharp.Core\BotSharp.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<ProjectReference Include="..\..\Infrastructure\BotSharp.OpenAPI\BotSharp.OpenAPI.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<ProjectReference Include="..\..\Infrastructure\BotSharp.Abstraction\BotSharp.Abstraction.csproj" />
|
||||
<ProjectReference Include="..\..\Infrastructure\BotSharp.OpenAPI\BotSharp.OpenAPI.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="StrongGrid" Version="0.102.0" />
|
||||
<PackageReference Include="StrongGrid" Version="0.104.0" />
|
||||
<PackageReference Include="Twilio.AspNet.Common" Version="8.0.2" />
|
||||
<PackageReference Include="Twilio.AspNet.Core" Version="8.0.2" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -20,14 +20,16 @@ Log.Logger = new LoggerConfiguration()
|
|||
.CreateLogger();
|
||||
builder.Host.UseSerilog();
|
||||
|
||||
// Add BotSharp
|
||||
builder.Services.AddBotSharpCore(builder.Configuration)
|
||||
.AddBotSharpOpenAPI(builder.Configuration, new[]
|
||||
string[] allowedOrigins = builder.Configuration.GetSection("AllowedOrigins").Get<string[]>() ?? new[]
|
||||
{
|
||||
"http://localhost:5015",
|
||||
"http://0.0.0.0:5015",
|
||||
"https://botsharp.scisharpstack.org",
|
||||
"https://chat.scisharpstack.org"
|
||||
}, builder.Environment, true)
|
||||
};
|
||||
|
||||
// Add BotSharp
|
||||
builder.Services.AddBotSharpCore(builder.Configuration)
|
||||
.AddBotSharpOpenAPI(builder.Configuration, allowedOrigins, builder.Environment, true)
|
||||
.AddBotSharpLogger(builder.Configuration);
|
||||
|
||||
// Add SignalR for WebSocket
|
||||
|
|
|
|||
|
|
@ -59,4 +59,4 @@
|
|||
<Folder Include="Properties\PublishProfiles\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -6,11 +6,16 @@
|
|||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"AllowedOrigins": [
|
||||
"http://localhost:5015",
|
||||
"http://0.0.0.0:5015",
|
||||
"https://botsharp.scisharpstack.org",
|
||||
"https://chat.scisharpstack.org"
|
||||
],
|
||||
"Jwt": {
|
||||
"Issuer": "botsharp",
|
||||
"Audience": "botsharp",
|
||||
"Key": "31ba6052aa6f4569901facc3a41fcb4a"
|
||||
"Key": "31ba6052aa6f4569901facc3a41fcb4adfd9b46dd00c40af8a753fbdc2b89869"
|
||||
},
|
||||
|
||||
"OAuth": {
|
||||
|
|
@ -100,7 +105,7 @@
|
|||
"EnableLlmCompletionLog": false,
|
||||
"EnableExecutionLog": true,
|
||||
"EnableContentLog": true,
|
||||
"EnableStateLog": true
|
||||
"EnableStateLog": true
|
||||
},
|
||||
|
||||
"Statistics": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue