# .env.template - Template of environment variables for docker-compose
# Copy this file to `.env` (local), `.env.staging`, or `.env.production` and fill the secret values.
# Do NOT commit your `.env.*` files containing real secrets.

# Common
ASPNETCORE_ENVIRONMENT=Development

# Web (myai-web container) - maps to web appsettings Site:Mode section
# Controls the public site experience:
#   Normal             - full site (default)
#   UnderConstruction  - redirect visitors to /under-construction.html
#   Unavailable        - redirect visitors to /site-unavailable.html (HTTP 503)
Site__Mode=Normal

# API (main)
ASPNETCORE_URLS=http://+:8080
APP_ENVIRONMENT_NAME=myai-Development

# SMTP Configuration
Smtp__Host=your.smtp.host
Smtp__Port=587
Smtp__Username=your-smtp-username
Smtp__Password=
Smtp__UseStartTls=true

# AI Settings (choose provider: OpenAI or Ollama)
Ai__Provider=OpenAI

# OpenAI settings
Ai__OpenAI__ApiKey=
Ai__OpenAI__ChatModel=gpt-4o-mini
Ai__OpenAI__EmbeddingModel=text-embedding-3-large
Ai__OpenAI__TimeoutSeconds=30

# Ollama settings
Ai__Ollama__BaseUrl=http://localhost:11434
Ai__Ollama__ChatModel=llama2
Ai__Ollama__EmbeddingModel=embedding-model
Ai__Ollama__TimeoutSeconds=30

# Database (shared) - maps to Database:Host etc. used by apps
Database__Host=sqlserver
Database__Port=1433
Database__Name=MyAiDb
Database__User=sa
Database__Password=
Database__TrustServerCertificate=true

# RAG settings
Rag__MaxFileSizeMb=8
Rag__ChunkSize=900
Rag__ChunkOverlap=150
Rag__MaxTextChars=60000
Rag__DefaultTopK=20
Rag__MaxTopK=50
Rag__ClassifyWithAi=false

# Matcher settings (cv-matcher)
Matcher__TopK=10
Matcher__DeepScoreTopN=5
Matcher__MaxJobTextChars=60000

# RagApi credentials
RagApi__BaseUrl=http://rag-api:8080
RagApi__InternalApiKey=
RagApi__RequireApiKey=true

# CvMatcher credentials
CvMatcherApi__BaseUrl=http://cv-matcher-api:8080
CvMatcherApi__InternalApiKey=
CvMatcherApi__RequireApiKey=true

# Captcha
Captcha__Provider=Recaptcha
Captcha__SecretKey=
Captcha__PublicKey=
Captcha__MinimumScore=0.5

# CV cleanup job container (scheduled CV file storage cleanup)
Jobs__CvStorageCleanupEnabled=true
Jobs__CvStorageCleanupInterval=01:00:00
Jobs__CvStorageMaxTotalSizeMegabytes=40

# File Storage
FileStorage__Path=Files
FileStorage__DefaultFileName=
FileStorage__ToEmail=
FileStorage__SubjectPrefix=[File Download]

# Contact / Subscribe
Contact__ToEmail=
Contact__SubjectPrefix=[Contact]
Subscribe__ToEmail=
Subscribe__SubjectPrefix=[Subscribe]

# CORS
Cors__AllowedOrigins__0=http://localhost:3000
Cors__AllowedOrigins__1=http://localhost:5000

# Logging
Logging__LogLevel__Default=Information
Logging__LogLevel__Microsoft=Warning
Logging__LogLevel__Microsoft__AspNetCore=Warning
Logging__LogLevel__Api=Information

# Serilog
Serilog__WriteTo__2__Args__fromEmail=
Serilog__WriteTo__2__Args__toEmail=
Serilog__WriteTo__2__Args__mailServer=
Serilog__WriteTo__2__Args__networkCredential__userName=
Serilog__WriteTo__2__Args__networkCredential__password=
Serilog__WriteTo__2__Args__port=587
Serilog__WriteTo__2__Args__enableSsl=true

# CvMatcher API internal
CvMatcherApi__BaseUrl=http://cv-matcher-api:8081
CvMatcherApi__InternalApiKey=

# Rate Limiting (api - public rate limits)
# Window uses TimeSpan strings: "hh:mm:ss" (e.g. "00:01:00" = 1 minute, "00:10:00" = 10 minutes).
RateLimiting__Global__PermitLimit=120
RateLimiting__Global__Window=00:01:00
RateLimiting__Global__QueueLimit=0
RateLimiting__Policies__contact__PermitLimit=5
RateLimiting__Policies__contact__Window=00:01:00
RateLimiting__Policies__contact__QueueLimit=0
RateLimiting__Policies__cvMatcher__PermitLimit=10
RateLimiting__Policies__cvMatcher__Window=00:10:00
RateLimiting__Policies__cvMatcher__QueueLimit=0
