Spaces:
Sleeping
Sleeping
Add MongoDB Atlas configuration for secure database connection
Browse files- Update Dockerfile with MongoDB environment variables
- Add .env.example template for required secrets
- .env.example +36 -0
- Dockerfile +9 -1
.env.example
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LibreChat MongoDB Atlas Configuration
|
| 2 |
+
# Copy this file to .env and fill in your actual values
|
| 3 |
+
|
| 4 |
+
# MongoDB Atlas Connection
|
| 5 |
+
MONGO_URI=mongodb+srv://<username>:<password>@<cluster-name>.mongodb.net/<database-name>?retryWrites=true&w=majority
|
| 6 |
+
|
| 7 |
+
# Session Security
|
| 8 |
+
SESSION_EXPIRY=900000
|
| 9 |
+
REFRESH_TOKEN_EXPIRY=604800000
|
| 10 |
+
JWT_SECRET=your-super-secure-jwt-secret-key-here
|
| 11 |
+
JWT_REFRESH_SECRET=your-super-secure-jwt-refresh-secret-key-here
|
| 12 |
+
|
| 13 |
+
# Application Configuration
|
| 14 |
+
HOST=0.0.0.0
|
| 15 |
+
PORT=3080
|
| 16 |
+
NODE_ENV=production
|
| 17 |
+
|
| 18 |
+
# API Keys (if using external services)
|
| 19 |
+
MISTRAL_API_KEY=your-mistral-api-key-here
|
| 20 |
+
OPENROUTER_KEY=your-openrouter-key-here
|
| 21 |
+
|
| 22 |
+
# Security Settings
|
| 23 |
+
CREDS_KEY=your-32-character-credentials-encryption-key
|
| 24 |
+
CREDS_IV=your-16-character-initialization-vector
|
| 25 |
+
|
| 26 |
+
# Optional: Enable search functionality
|
| 27 |
+
# SEARCH=true
|
| 28 |
+
# MEILI_NO_ANALYTICS=true
|
| 29 |
+
# MEILI_HOST=https://your-meilisearch-instance.com
|
| 30 |
+
# MEILI_HTTP_ADDR=https://your-meilisearch-instance.com
|
| 31 |
+
|
| 32 |
+
# Database Configuration
|
| 33 |
+
DB_NAME=librechat
|
| 34 |
+
CONVERSATIONS_COLLECTION=conversations
|
| 35 |
+
USERS_COLLECTION=users
|
| 36 |
+
SESSIONS_COLLECTION=sessions
|
Dockerfile
CHANGED
|
@@ -1,11 +1,19 @@
|
|
| 1 |
FROM ghcr.io/danny-avila/librechat-dev:latest
|
| 2 |
EXPOSE 3080
|
| 3 |
|
| 4 |
-
# Set environment variables
|
| 5 |
ENV HOST=0.0.0.0
|
| 6 |
ENV PORT=3080
|
| 7 |
ENV SESSION_EXPIRY=900000
|
| 8 |
ENV REFRESH_TOKEN_EXPIRY=604800000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
# Uncomment the following ENV to enable search
|
| 11 |
# Feel free to clone our meilisearch space and update the URL with your own
|
|
|
|
| 1 |
FROM ghcr.io/danny-avila/librechat-dev:latest
|
| 2 |
EXPOSE 3080
|
| 3 |
|
| 4 |
+
# Set default environment variables
|
| 5 |
ENV HOST=0.0.0.0
|
| 6 |
ENV PORT=3080
|
| 7 |
ENV SESSION_EXPIRY=900000
|
| 8 |
ENV REFRESH_TOKEN_EXPIRY=604800000
|
| 9 |
+
ENV NODE_ENV=production
|
| 10 |
+
|
| 11 |
+
# MongoDB Configuration (will be overridden by Hugging Face Secrets)
|
| 12 |
+
ENV MONGO_URI=""
|
| 13 |
+
ENV JWT_SECRET=""
|
| 14 |
+
ENV JWT_REFRESH_SECRET=""
|
| 15 |
+
ENV CREDS_KEY=""
|
| 16 |
+
ENV CREDS_IV=""
|
| 17 |
|
| 18 |
# Uncomment the following ENV to enable search
|
| 19 |
# Feel free to clone our meilisearch space and update the URL with your own
|