Skip to Content
DocumentationEnvironment

Revornix Environment Variable Guide

This guide helps you understand the purpose and service scope of each environment variable when deploying or customizing Revornix. Unless noted otherwise, the sample values come from the root-level .env.

Store all secret-style variables in a secure secret management tool and never commit them to version control.

🧭 Common placement: the root .env for Docker Compose; api/.env and celery-worker/.env for running the API or worker locally.


1. Core Security & Authentication

VariableExampleDescriptionPrimary locations
OAUTH_SECRET_KEYd2cd0e...ce6f9Used for user sessions and JWT encryption; must match across API and workersapi/config/oauth2.py:4, celery-worker/config/oauth2.py:4, docker-compose.yaml:62
APIKEY_ENCRYPT_KEY623f8bce26d03...Base64-encoded 32-byte key for encrypting third-party model/API secretsapi/common/encrypt.py:5, celery-worker/common/encrypt.py:5
ENV (optional)devSet to dev to auto-load the local .env file and enable verbose logsapi/main.py:3, celery-worker/common/celery/app.py:3

2. Data & Queue Services

VariableExampleDescriptionPrimary locations
POSTGRES_USERrevornixPostgreSQL usernameapi/common/sql.py:3, docker-compose.yaml:176
POSTGRES_PASSWORD12345678PostgreSQL passwordSame as above
POSTGRES_DBrevornixPrimary database nameSame as above
POSTGRES_DB_URLpostgresDatabase host (postgres in Docker, localhost for local runs)api/common/sql.py:6, alembic/env.py:21
REDIS_URLredisRedis host, used for cache, sessions, and task queue brokerapi/common/redis.py:5, celery-worker/common/celery/app.py:35
REDIS_PORT6379Redis portSame as above
MILVUS_CLUSTER_ENDPOINThttp://milvus-standalone:19530Milvus cluster endpointapi/data/milvus/base.py:9, celery-worker/config/milvus.py:3
MILVUS_TOKENroot:MilvusCredentials for MilvusSame as above
NEO4J_URIbolt://localhost:7687Neo4j database URIapi/data/neo4j/base.py:8, celery-worker/data/neo4j/base.py:8
NEO4J_USERneo4jNeo4j usernameSame as above
NEO4J_PASS12345678Neo4j passwordSame as above
HF_ENDPOINThttps://hf-mirror.comHuggingFace Hub entry point (custom mirrors supported)docker-compose.yaml:68, docker-compose.yaml:114

3. File System & Object Storage

VariableExampleDescriptionPrimary locations
FILE_SYSTEM_USER_NAMErevornixMinIO/Built-in file system usernameapi/config/file_system.py:3, celery-worker/config/file_system.py:3
FILE_SYSTEM_PASSWORD12345678MinIO/Built-in file system passwordSame as above
FILE_SYSTEM_SERVER_PUBLIC_URLhttp://localhost/api/file-servicePublic URL for file access (usually via Nginx)api/protocol/remote_file_service.py:25, nginx/nginx.conf:53
FILE_SYSTEM_SERVER_PRIVATE_URLhttp://file-backend:9010Internal address for API/worker within the networkSame as above

4. Milvus Dependencies (Etcd / MinIO)

Required only when deploying Milvus via Docker Compose:

VariableExampleDescriptionPrimary locations
ETCD_ENDPOINTShttp://etcd:2379Etcd endpoint used by Milvusdocker-compose.yaml:150
ETCD_AUTO_COMPACTION_MODErevisionEtcd auto-compaction modeSame as above
ETCD_AUTO_COMPACTION_RETENTION1000Etcd revision retentionSame as above
ETCD_QUOTA_BACKEND_BYTES4294967296Etcd storage quotaSame as above
ETCD_SNAPSHOT_COUNT50000Etcd snapshot thresholdSame as above
MILVUS_MINIO_USER_NAMEminioadminInternal MinIO username for Milvusdocker-compose.yaml:122
MILVUS_MINIO_PASSWORDminioadminInternal MinIO password for MilvusSame as above
NEO4J_AUTHneo4j/12345678Initial credentials for Neo4j containerdocker-compose.yaml:163

5. Third-Party Login & Notifications

VariableExampleDescriptionPrimary locations
GOOGLE_CLIENT_ID4173...apps.googleusercontent.comGoogle OAuth application IDapi/router/user.py:399, api/router/user.py:454
GOOGLE_CLIENT_SECRETGOCSPX-...Google OAuth secretSame as above
GITHUB_CLIENT_IDIv23liJSg8...GitHub OAuth application IDapi/router/user.py:486, api/router/user.py:541
GITHUB_CLIENT_SECRETa752f8c8...GitHub OAuth secretSame as above
WECHAT_APP_IDwx8bdsa4...WeChat Official/Open Platform App IDapi/router/user.py:680, api/router/user.py:740
WECHAT_APP_SECRETbcbaf3...8072WeChat application secretSame as above
TENCENT_SECRET_IDAKIDwlRu...Tencent Cloud SMS SecretIdapi/config/sms.py:3, docker-compose.yaml:51
TENCENT_SECRET_KEY96sQlsmTx...Tencent Cloud SMS SecretKeySame as above
TENCENT_SMS_SDK_APP_ID140...Tencent SMS application IDSame as above
TENCENT_SMS_APP_KEYcf1551461de61cd6...Tencent SMS AppKeySame as above
TENCENT_SMS_SIGNSIGNATURESMS signatureSame as above
MAIL_SENDER (optional)noreply@yourdomain.comEmail account for notificationscelery-worker/config/mail.py:2, api/notify/email
MAIL_PASSWORD (optional)your-app-passEmail password or app tokenSame as above

6. Front-End Visible Variables (NEXT_PUBLIC_*)

These variables are bundled into the browser build—do not place sensitive information here.

VariableExampleDescriptionPrimary locations
NEXT_PUBLIC_API_PREFIXhttp://localhost/api/main-serviceBase URL for the core backendweb/src/config/api.ts:1, next.config.ts:28
NEXT_PUBLIC_NOTIFICATION_WS_API_PREFIXws://localhost/api/main-service/notification/wsWebSocket endpoint for notificationsweb/src/config/api.ts:2
NEXT_PUBLIC_DAILY_HOT_API_PREFIXhttp://localhost/api/daily-hot-serviceDaily Hot aggregation endpointweb/src/config/api.ts:3
NEXT_PUBLIC_WECHAT_APP_IDwx8b244c17b73a8672Used to generate the WeChat QR login URLweb/components/user/wechat-bind.tsx:50
NEXT_PUBLIC_ALLOW_THIRD_PARTY_AUTHtrue/falseToggles third-party login entry pointsweb/src/app/(public)/account/page.tsx:87

7. Daily Hot Aggregation Service (Node App)

VariableDefaultDescriptionPrimary locations
PORT6688Listening port for Daily Hotdaily-hot/src/config.ts:36
DISALLOW_ROBOTtrueWhether to block crawlersSame as above
CACHE_TTL3600Cache duration for rankings (seconds)Same as above
REQUEST_TIMEOUT6000Upstream request timeout (milliseconds)Same as above
ALLOWED_DOMAIN*Allowed domain wildcardSame as above
ALLOWED_HOSTimsyy.topTop-level host whitelistSame as above
USE_LOG_FILEtrueWhether to write log filesSame as above
RSS_MODEfalseWhether to output RSS by defaultSame as above
REDIS_HOST127.0.0.1Redis host used by Daily HotSame as above
REDIS_PORT6379Redis portSame as above
REDIS_PASSWORD""Redis password (if required)Same as above

8. Additional Tips

  • Local development: Use api/.env and celery-worker/.env to override the main .env so production settings remain untouched. Refer to api/.env.example and celery-worker/.env.example for samples.
  • Docker deployment: docker-compose.yaml reads variables from the root .env and passes them to services such as api, celery-worker, web, and daily-hot. Ensure the contents match your target environment.
  • Secret management: Use Vault, AWS Secrets Manager, or Docker secrets in production. Never print secret values in logs or terminals.

Good luck with your deployment—feedback is always welcome!

Last updated on