Skip to main content

Environment Variables

Create a .env file by copying .env.example, then configure the environment variables as described below.

cp .env.example .env

Required Environment Variables

The following variables must be set in order to run the service locally.

CLOVA Studio

Refer to the official CLOVA Studio documentation for instructions on issuing API keys.

VariableDescription
HCX_API_KEYHyperCLOVA X API key
CLOVA_STUDIO_URLCLOVA Studio API endpoint URL
CLOVA_STUDIO_HOSTCLOVA Studio host
CLOVA_STUDIO_API_KEYCLOVA Studio API key
CLOVA_STUDIO_GW_API_KEYCLOVA Studio Gateway API key
CLOVA_STUDIO_REQUEST_IDCLOVA Studio request ID
CLOVA_STUDIO_APP_IDCLOVA Studio application ID

Swagger UI

VariableDescription
SWAGGER_USERNAMEUsername for Swagger UI access
SWAGGER_PASSWORDPassword for Swagger UI access

Internal API

VariableDescriptionExample
INTERNAL_API_KEYAuthentication key for the internal problem registration API. Any arbitrary string may be used.my-secret-api-key-1234

Local Storage (Security)

VariableDescriptionExample
SECRET_KEYSecret key used for URL signing. Any sufficiently random string may be used.my-secret-key-5678

Optional Environment Variables

The following variables have default values and may be overridden depending on the deployment environment.

General

VariableDescriptionDefault
ENVApplication runtime environmentLOCAL
STORAGEStorage backend typeLOCAL
CORS_ORIGINSAllowed CORS origins*

Database (MySQL)

VariableDescriptionDefault
MYSQL_USERMySQL usernamelocal
MYSQL_PASSWORDMySQL passwordlocal_password
MYSQL_HOSTMySQL host0.0.0.0
MYSQL_PORTMySQL port3306
MYSQL_DBDatabase namelocal

Redis

VariableDescriptionDefault
RC_SEED_URLRedis cluster seed URLredis:6379
RC_PASSWORDRedis passwordlocal_password
RC_TTLRedis TTL (in seconds)3600

Weaviate (Vector Database)

VariableDescriptionDefault
WEAVIATE_HOSTWeaviate hostlocalhost
WEAVIATE_PORTWeaviate port8081
PROBLEM_INDEXProblem index nameProblem_opensource
CURRICULUM_INDEXCurriculum index nameCurriculum_opensource

Model Server

VariableDescriptionDefault
MODEL_SERVER_GRPC_URLgRPC endpoint of the model serveredu-model-server:8051
RESPONSE_MODELModel used for response generationhcx-005
GRPC_PORTgRPC port8051
EMBEDDING_TYPEEmbedding provider typeclovastudio

Local Storage

VariableDescriptionDefault
UPLOAD_DIRDirectory for uploaded filesstatic
URL_EXPIRY_SECONDSSigned URL expiration time (seconds)3600
BASE_URLBase API URLhttp://localhost:8000/api/v1

Server URLs

VariableDescriptionDefault
DATA_SERVER_URLData server API URLhttp://localhost:8001/api/v1
BE_SERVER_URLBackend server API URLhttp://localhost:8000/api/v1