Skip to main content
This page documents all environment variables used to configure the InterviewGuide platform. Environment variables can be set in your shell, .env file, or container orchestration system.

Quick Start

Copy the example environment file and customize it:
cp .env.example .env
Edit .env with your configuration values, particularly the required AI API key.
The AI_BAILIAN_API_KEY is required for the application to function. All other variables have sensible defaults.

AI Configuration

These variables configure the AI model provider and behavior.
AI_BAILIAN_API_KEY
string
required
API key for Aliyun DashScope (百炼). This is the primary authentication credential for accessing Qwen models.Required: YesExample: sk-1234567890abcdefGet your API key from the Aliyun DashScope Console.
AI_MODEL
string
default:"qwen-plus"
The Qwen model to use for AI operations.Options:
  • qwen-plus - Balanced performance and cost (recommended)
  • qwen-max - Highest quality, slower and more expensive
  • qwen-long - Optimized for long-context tasks
  • qwen-turbo - Fastest, lower quality
Maps to: spring.ai.openai.chat.options.model in application.yml
APP_AI_STRUCTURED_MAX_ATTEMPTS
integer
default:"2"
Maximum number of retry attempts when parsing structured output from the AI model.When the AI returns JSON that doesn’t match the expected schema, the system will retry up to this many times.Maps to: app.ai.structured-max-attempts in application.yml
APP_AI_STRUCTURED_INCLUDE_LAST_ERROR
boolean
default:"true"
Whether to include the previous parsing error in the retry prompt to help the model fix its output.When enabled, the error message is sent back to the AI to guide it toward producing valid output.Maps to: app.ai.structured-include-last-error in application.yml

RAG (Retrieval-Augmented Generation) Configuration

These advanced variables tune the knowledge base search behavior.
APP_AI_RAG_REWRITE_ENABLED
boolean
default:"true"
Enable query rewriting to improve search quality. When enabled, user queries are reformulated for better vector search results.Maps to: app.ai.rag.rewrite.enabled
APP_AI_RAG_SHORT_QUERY_LENGTH
integer
default:"4"
Queries with character count ≤ this value are considered “short” and use different search parameters.Maps to: app.ai.rag.search.short-query-length
APP_AI_RAG_TOPK_SHORT
integer
default:"20"
Number of documents to retrieve for short queries.Maps to: app.ai.rag.search.topk-short
APP_AI_RAG_TOPK_MEDIUM
integer
default:"12"
Number of documents to retrieve for medium-length queries.Maps to: app.ai.rag.search.topk-medium
APP_AI_RAG_TOPK_LONG
integer
default:"8"
Number of documents to retrieve for long queries.Maps to: app.ai.rag.search.topk-long
APP_AI_RAG_MIN_SCORE_SHORT
float
default:"0.18"
Minimum similarity score threshold for short queries. Lower threshold allows more results.Maps to: app.ai.rag.search.min-score-short
APP_AI_RAG_MIN_SCORE_DEFAULT
float
default:"0.28"
Minimum similarity score threshold for normal queries.Maps to: app.ai.rag.search.min-score-default

Database Configuration

PostgreSQL connection settings.
POSTGRES_HOST
string
default:"localhost"
Hostname or IP address of the PostgreSQL server.In Docker Compose, this should be the service name postgres.Maps to: spring.datasource.url in application.yml
POSTGRES_PORT
integer
default:"5432"
Port number for PostgreSQL.Maps to: spring.datasource.url in application.yml
POSTGRES_DB
string
default:"interview_guide"
Name of the PostgreSQL database.Maps to: spring.datasource.url in application.yml
POSTGRES_USER
string
default:"postgres"
PostgreSQL username for authentication.Maps to: spring.datasource.username in application.yml
POSTGRES_PASSWORD
string
default:"123456"
PostgreSQL password for authentication.
Change this default password in production environments!
Maps to: spring.datasource.password in application.yml

Redis Configuration

Redis is used for caching and Redis Streams for asynchronous task processing.
REDIS_HOST
string
default:"localhost"
Hostname or IP address of the Redis server.In Docker Compose, this should be the service name redis.Maps to: spring.redis.redisson.config.singleServerConfig.address in application.yml
REDIS_PORT
integer
default:"6379"
Port number for Redis.Maps to: spring.redis.redisson.config.singleServerConfig.address in application.yml

Storage Configuration

S3-compatible object storage settings (MinIO or RustFS).
APP_STORAGE_ENDPOINT
string
default:"http://localhost:9000"
The endpoint URL for your S3-compatible storage service.Examples:
  • Local MinIO: http://localhost:9000
  • Docker network: http://minio:9000
  • RustFS: Your RustFS server URL
Maps to: app.storage.endpoint in application.yml
APP_STORAGE_ACCESS_KEY
string
default:"wr45VXJZhCxc6FAWz0YR"
S3 access key ID (equivalent to username).For MinIO, the default is minioadmin.Maps to: app.storage.access-key in application.yml
APP_STORAGE_SECRET_KEY
string
default:"GtKxV57WJkpw4CvASPBzTy2DYElLnRqh8dIXQa0m"
S3 secret access key (equivalent to password).For MinIO, the default is minioadmin.
Change these default credentials in production!
Maps to: app.storage.secret-key in application.yml
APP_STORAGE_BUCKET
string
default:"interview-guide"
The S3 bucket name where all files will be stored.This bucket must exist before the application starts. The Docker Compose setup creates this automatically.Maps to: app.storage.bucket in application.yml
APP_STORAGE_REGION
string
default:"us-east-1"
AWS region identifier.For MinIO/RustFS, this can be any value as regions aren’t enforced. The default us-east-1 is conventional.Maps to: app.storage.region in application.yml

Interview Configuration

Settings that control interview behavior.
APP_INTERVIEW_FOLLOW_UP_COUNT
integer
default:"1"
Number of follow-up questions to generate after each user answer in mock interviews.Higher values create more in-depth interviews but take longer to complete.Maps to: app.interview.follow-up-count in application.yml
APP_INTERVIEW_EVALUATION_BATCH_SIZE
integer
default:"8"
Number of interview answers to evaluate in a single batch during report generation.Larger batches are more efficient but require more memory.Maps to: app.interview.evaluation.batch-size in application.yml

CORS Configuration

CORS_ALLOWED_ORIGINS
string
Comma-separated list of allowed origins for CORS (Cross-Origin Resource Sharing).Add your frontend URL to this list. Multiple origins can be specified.Example: http://localhost:5173,https://myapp.comMaps to: app.cors.allowed-origins in application.yml

Environment Variable Mapping

This table shows how environment variables map to application.yml properties:
Environment Variableapplication.yml PropertyTypeDefault
AI_BAILIAN_API_KEYspring.ai.openai.api-keystringrequired
AI_MODELspring.ai.openai.chat.options.modelstringqwen-plus
APP_AI_STRUCTURED_MAX_ATTEMPTSapp.ai.structured-max-attemptsinteger2
APP_AI_STRUCTURED_INCLUDE_LAST_ERRORapp.ai.structured-include-last-errorbooleantrue
APP_AI_RAG_REWRITE_ENABLEDapp.ai.rag.rewrite.enabledbooleantrue
APP_AI_RAG_SHORT_QUERY_LENGTHapp.ai.rag.search.short-query-lengthinteger4
APP_AI_RAG_TOPK_SHORTapp.ai.rag.search.topk-shortinteger20
APP_AI_RAG_TOPK_MEDIUMapp.ai.rag.search.topk-mediuminteger12
APP_AI_RAG_TOPK_LONGapp.ai.rag.search.topk-longinteger8
APP_AI_RAG_MIN_SCORE_SHORTapp.ai.rag.search.min-score-shortfloat0.18
APP_AI_RAG_MIN_SCORE_DEFAULTapp.ai.rag.search.min-score-defaultfloat0.28
POSTGRES_HOSTspring.datasource.urlstringlocalhost
POSTGRES_PORTspring.datasource.urlinteger5432
POSTGRES_DBspring.datasource.urlstringinterview_guide
POSTGRES_USERspring.datasource.usernamestringpostgres
POSTGRES_PASSWORDspring.datasource.passwordstring123456
REDIS_HOSTspring.redis.redisson.configstringlocalhost
REDIS_PORTspring.redis.redisson.configinteger6379
APP_STORAGE_ENDPOINTapp.storage.endpointstringhttp://localhost:9000
APP_STORAGE_ACCESS_KEYapp.storage.access-keystring(varies)
APP_STORAGE_SECRET_KEYapp.storage.secret-keystring(varies)
APP_STORAGE_BUCKETapp.storage.bucketstringinterview-guide
APP_STORAGE_REGIONapp.storage.regionstringus-east-1
APP_INTERVIEW_FOLLOW_UP_COUNTapp.interview.follow-up-countinteger1
APP_INTERVIEW_EVALUATION_BATCH_SIZEapp.interview.evaluation.batch-sizeinteger8
CORS_ALLOWED_ORIGINSapp.cors.allowed-originsstringhttp://localhost:5173,...

Examples

AI_BAILIAN_API_KEY=sk-your-key-here
AI_MODEL=qwen-plus

POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password

REDIS_HOST=localhost
REDIS_PORT=6379

APP_STORAGE_ENDPOINT=http://localhost:9000
APP_STORAGE_ACCESS_KEY=minioadmin
APP_STORAGE_SECRET_KEY=minioadmin

See Also

Build docs developers (and LLMs) love