@@ -11,20 +11,56 @@ services:
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
# ASP.NET
|
||||
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development}
|
||||
- ASPNETCORE_URLS=http://+:8080
|
||||
- # Database settings (read by the apps as Database:Host/Port/Name/User/Password)
|
||||
- Database__Host=${Database__Host:-mssql}
|
||||
- ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080}
|
||||
- APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local}
|
||||
- LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true}
|
||||
|
||||
# Database: matches rag-api appsettings Database section
|
||||
- Database__Host=${Database__Host:-sqlserver}
|
||||
- Database__Port=${Database__Port:-1433}
|
||||
- Database__Name=${Database__Name:-MyAiCvMatcher}
|
||||
- Database__Name=${Database__Name:-MyAiDb}
|
||||
- Database__User=${Database__User:-sa}
|
||||
- Database__Password=${Database__Password:-Your_strong_password123}
|
||||
- Database__Password=${Database__Password:-}
|
||||
- Database__TrustServerCertificate=${Database__TrustServerCertificate:-true}
|
||||
- InternalApi__RequireApiKey=true
|
||||
|
||||
# InternalApi: matches rag-api appsettings InternalApi section
|
||||
- InternalApi__ApiKey=${InternalApi__ApiKey:-change-this-internal-key}
|
||||
- InternalApi__RequireApiKey=${InternalApi__RequireApiKey:-false}
|
||||
|
||||
# Rag: matches rag-api appsettings Rag section
|
||||
- Rag__MaxFileSizeMb=${Rag__MaxFileSizeMb:-8}
|
||||
- Rag__ChunkSize=${Rag__ChunkSize:-900}
|
||||
- Rag__ChunkOverlap=${Rag__ChunkOverlap:-150}
|
||||
- Rag__MaxTextChars=${Rag__MaxTextChars:-60000}
|
||||
- Rag__DefaultTopK=${Rag__DefaultTopK:-20}
|
||||
- Rag__MaxTopK=${Rag__MaxTopK:-50}
|
||||
- Rag__ClassifyWithAi=${Rag__ClassifyWithAi:-false}
|
||||
|
||||
# Ai: matches rag-api appsettings Ai section
|
||||
- Ai__Provider=${Ai__Provider:-OpenAI}
|
||||
- Ai__OpenAI__ApiKey=${Ai__OpenAI__ApiKey:-}
|
||||
- Ai__OpenAI__ChatModel=${Ai__OpenAI__ChatModel:-gpt-4o-mini}
|
||||
- Ai__OpenAI__EmbeddingModel=${Ai__OpenAI__EmbeddingModel:-text-embedding-3-small}
|
||||
- Ai__OpenAI__TimeoutSeconds=${Ai__OpenAI__TimeoutSeconds:-90}
|
||||
- Ai__Ollama__BaseUrl=${Ai__Ollama__BaseUrl:-http://host.docker.internal:11434}
|
||||
- Ai__Ollama__ChatModel=${Ai__Ollama__ChatModel:-llama3.1:8b}
|
||||
- Ai__Ollama__EmbeddingModel=${Ai__Ollama__EmbeddingModel:-nomic-embed-text}
|
||||
- Ai__Ollama__TimeoutSeconds=${Ai__Ollama__TimeoutSeconds:-180}
|
||||
|
||||
# Logging / Serilog
|
||||
- Logging__LogLevel__Default=${Logging__LogLevel__Default:-Information}
|
||||
- Logging__LogLevel__Microsoft=${Logging__LogLevel__Microsoft:-Warning}
|
||||
- Logging__LogLevel__Microsoft__AspNetCore=${Logging__LogLevel__Microsoft__AspNetCore:-Warning}
|
||||
- Logging__LogLevel__Api=${Logging__LogLevel__Api:-Information}
|
||||
- Serilog__WriteTo__2__Args__fromEmail=${Serilog__WriteTo__2__Args__fromEmail:-}
|
||||
- Serilog__WriteTo__2__Args__toEmail=${Serilog__WriteTo__2__Args__toEmail:-}
|
||||
- Serilog__WriteTo__2__Args__mailServer=${Serilog__WriteTo__2__Args__mailServer:-}
|
||||
- Serilog__WriteTo__2__Args__networkCredential__userName=${Serilog__WriteTo__2__Args__networkCredential__userName:-}
|
||||
- Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-}
|
||||
- Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587}
|
||||
- Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true}
|
||||
networks:
|
||||
- myai-network
|
||||
restart: unless-stopped
|
||||
@@ -41,47 +77,133 @@ services:
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
# ASP.NET
|
||||
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development}
|
||||
- ASPNETCORE_URLS=http://+:8080
|
||||
- # Database settings (cv-matcher uses same keys)
|
||||
- Database__Host=${Database__Host:-mssql}
|
||||
- ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080}
|
||||
- APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local}
|
||||
- LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true}
|
||||
|
||||
# Database: matches cv-matcher-api appsettings Database section
|
||||
- Database__Host=${Database__Host:-sqlserver}
|
||||
- Database__Port=${Database__Port:-1433}
|
||||
- Database__Name=${Database__Name:-MyAiCvMatcher}
|
||||
- Database__Name=${Database__Name:-MyAiDb}
|
||||
- Database__User=${Database__User:-sa}
|
||||
- Database__Password=${Database__Password:-Your_strong_password123}
|
||||
- Database__Password=${Database__Password:-}
|
||||
- Database__TrustServerCertificate=${Database__TrustServerCertificate:-true}
|
||||
- InternalApi__RequireApiKey=true
|
||||
|
||||
# InternalApi: matches cv-matcher-api appsettings InternalApi section
|
||||
- InternalApi__ApiKey=${InternalApi__ApiKey:-change-this-internal-key}
|
||||
- RagApi__BaseUrl=http://rag-api:8080
|
||||
- RagApi__InternalApiKey=${InternalApi__ApiKey:-change-this-internal-key}
|
||||
- InternalApi__RequireApiKey=${InternalApi__RequireApiKey:-false}
|
||||
|
||||
# RagApi: matches cv-matcher-api appsettings RagApi section
|
||||
# IMPORTANT: this must use the container-internal port, not the host-mapped port.
|
||||
- RagApi__BaseUrl=${RagApi__BaseUrl:-http://rag-api:8080}
|
||||
- RagApi__InternalApiKey=${RagApi__InternalApiKey:-${InternalApi__ApiKey:-change-this-internal-key}}
|
||||
|
||||
# Ai: matches cv-matcher-api appsettings Ai section
|
||||
- Ai__Provider=${Ai__Provider:-OpenAI}
|
||||
- Ai__OpenAI__ApiKey=${Ai__OpenAI__ApiKey:-}
|
||||
- Ai__OpenAI__ChatModel=${Ai__OpenAI__ChatModel:-gpt-4o-mini}
|
||||
- Ai__OpenAI__TimeoutSeconds=${Ai__OpenAI__TimeoutSeconds:-90}
|
||||
- Ai__Ollama__BaseUrl=${Ai__Ollama__BaseUrl:-http://host.docker.internal:11434}
|
||||
- Ai__Ollama__ChatModel=${Ai__Ollama__ChatModel:-llama3.1:8b}
|
||||
- Ai__Ollama__TimeoutSeconds=${Ai__Ollama__TimeoutSeconds:-180}
|
||||
|
||||
# Matcher: matches cv-matcher-api appsettings Matcher section
|
||||
- Matcher__TopK=${Matcher__TopK:-10}
|
||||
- Matcher__DeepScoreTopN=${Matcher__DeepScoreTopN:-5}
|
||||
- Matcher__MaxJobTextChars=${Matcher__MaxJobTextChars:-60000}
|
||||
|
||||
# Logging / Serilog
|
||||
- Logging__LogLevel__Default=${Logging__LogLevel__Default:-Information}
|
||||
- Logging__LogLevel__Microsoft=${Logging__LogLevel__Microsoft:-Warning}
|
||||
- Logging__LogLevel__Microsoft__AspNetCore=${Logging__LogLevel__Microsoft__AspNetCore:-Warning}
|
||||
- Logging__LogLevel__Api=${Logging__LogLevel__Api:-Information}
|
||||
- Serilog__WriteTo__2__Args__fromEmail=${Serilog__WriteTo__2__Args__fromEmail:-}
|
||||
- Serilog__WriteTo__2__Args__toEmail=${Serilog__WriteTo__2__Args__toEmail:-}
|
||||
- Serilog__WriteTo__2__Args__mailServer=${Serilog__WriteTo__2__Args__mailServer:-}
|
||||
- Serilog__WriteTo__2__Args__networkCredential__userName=${Serilog__WriteTo__2__Args__networkCredential__userName:-}
|
||||
- Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-}
|
||||
- Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587}
|
||||
- Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true}
|
||||
networks:
|
||||
- myai-network
|
||||
restart: unless-stopped
|
||||
|
||||
api:
|
||||
depends_on:
|
||||
- cv-matcher-api
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: api/Dockerfile
|
||||
container_name: myai-api
|
||||
depends_on:
|
||||
- cv-matcher-api
|
||||
ports:
|
||||
- "8080:8080"
|
||||
env_file:
|
||||
- ../api/.env
|
||||
- .env
|
||||
# Keep this only if api/.env contains api-specific overrides not present in docker-compose/.env.
|
||||
# - ../api/.env
|
||||
environment:
|
||||
# ASP.NET
|
||||
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development}
|
||||
- ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080}
|
||||
- Cors__AllowedOrigins__0=http://localhost:5000
|
||||
- Cors__AllowedOrigins__1=http://web:8080
|
||||
- CvMatcherApi__BaseUrl=http://cv-matcher-api:8080
|
||||
- CvMatcherApi__InternalApiKey=${CvMatcherApi__InternalApiKey:-change-this-internal-key}
|
||||
- APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local}
|
||||
- LogEnvironmentOnStartup=${LogEnvironmentOnStartup:-true}
|
||||
|
||||
# Google: matches api appsettings Google section
|
||||
- Google__TagManagerId=${Google__TagManagerId:-}
|
||||
- Google__MapKey=${Google__MapKey:-}
|
||||
|
||||
# Contact / Subscribe: matches api appsettings Contact and Subscribe sections
|
||||
- Contact__ToEmail=${Contact__ToEmail:-}
|
||||
- Contact__FromEmail=${Contact__FromEmail:-${Smtp__Username:-}}
|
||||
- Contact__SubjectPrefix=${Contact__SubjectPrefix:-}
|
||||
- Subscribe__ToEmail=${Subscribe__ToEmail:-}
|
||||
- Subscribe__SubjectPrefix=${Subscribe__SubjectPrefix:-}
|
||||
|
||||
# SMTP: matches api appsettings Smtp section
|
||||
- Smtp__Host=${Smtp__Host:-mail.example.com}
|
||||
- Smtp__Port=${Smtp__Port:-587}
|
||||
- Smtp__Username=${Smtp__Username:-}
|
||||
- Smtp__Password=${Smtp__Password:-}
|
||||
- Smtp__UseStartTls=${Smtp__UseStartTls:-false}
|
||||
|
||||
# Captcha: matches api appsettings Captcha section
|
||||
- Captcha__Provider=${Captcha__Provider:-Recaptcha}
|
||||
- Captcha__SecretKey=${Captcha__SecretKey:-}
|
||||
- Captcha__PublicKey=${Captcha__PublicKey:-}
|
||||
- Captcha__MinimumScore=${Captcha__MinimumScore:-0.5}
|
||||
|
||||
# FileStorage: matches api appsettings FileStorage section
|
||||
- FileStorage__Path=${FileStorage__Path:-Files}
|
||||
- FileStorage__DefaultFileName=${FileStorage__DefaultFileName:-}
|
||||
- FileStorage__ToEmail=${FileStorage__ToEmail:-}
|
||||
- FileStorage__FromEmail=${FileStorage__FromEmail:-${Smtp__Username:-}}
|
||||
- FileStorage__SubjectPrefix=${FileStorage__SubjectPrefix:-[File Download]}
|
||||
|
||||
# CvMatcherApi: matches api appsettings CvMatcherApi section
|
||||
- CvMatcherApi__BaseUrl=${CvMatcherApi__BaseUrl:-http://cv-matcher-api:8080}
|
||||
- CvMatcherApi__InternalApiKey=${CvMatcherApi__InternalApiKey:-${InternalApi__ApiKey:-change-this-internal-key}}
|
||||
|
||||
# CORS: not in the uploaded api appsettings, but used by your API startup config.
|
||||
- Cors__AllowedOrigins__0=${Cors__AllowedOrigins__0:-http://localhost:5000}
|
||||
- Cors__AllowedOrigins__1=${Cors__AllowedOrigins__1:-http://web:8080}
|
||||
|
||||
# Logging / Serilog
|
||||
- Logging__LogLevel__Default=${Logging__LogLevel__Default:-Information}
|
||||
- Logging__LogLevel__Microsoft=${Logging__LogLevel__Microsoft:-Warning}
|
||||
- Logging__LogLevel__Microsoft__AspNetCore=${Logging__LogLevel__Microsoft__AspNetCore:-Warning}
|
||||
- Logging__LogLevel__Api=${Logging__LogLevel__Api:-Information}
|
||||
- Serilog__WriteTo__2__Args__fromEmail=${Serilog__WriteTo__2__Args__fromEmail:-}
|
||||
- Serilog__WriteTo__2__Args__toEmail=${Serilog__WriteTo__2__Args__toEmail:-}
|
||||
- Serilog__WriteTo__2__Args__mailServer=${Serilog__WriteTo__2__Args__mailServer:-}
|
||||
- Serilog__WriteTo__2__Args__networkCredential__userName=${Serilog__WriteTo__2__Args__networkCredential__userName:-}
|
||||
- Serilog__WriteTo__2__Args__networkCredential__password=${Serilog__WriteTo__2__Args__networkCredential__password:-}
|
||||
- Serilog__WriteTo__2__Args__port=${Serilog__WriteTo__2__Args__port:-587}
|
||||
- Serilog__WriteTo__2__Args__enableSsl=${Serilog__WriteTo__2__Args__enableSsl:-true}
|
||||
volumes:
|
||||
- ../api/logs:/app/logs
|
||||
- ${FileStorage__Path:-../Files}:/app/Files
|
||||
networks:
|
||||
- myai-network
|
||||
restart: unless-stopped
|
||||
@@ -100,10 +222,11 @@ services:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development}
|
||||
- ASPNETCORE_URLS=${ASPNETCORE_URLS:-http://+:8080}
|
||||
- APP_ENVIRONMENT_NAME=${APP_ENVIRONMENT_NAME:-myai.local}
|
||||
networks:
|
||||
- myai-network
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
myai-network:
|
||||
driver: bridge
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user