Libbrechat Utilities
A collection of utility Docker images for managing LibreChat deployments at Brown University.
This repository contains two utility services:
- librechat-config-file: Manages and deploys LibreChat configuration files
- librechat-clean-logs: Automated log cleanup service
A lightweight Alpine-based Docker image that copies the LibreChat configuration file to a specified location.
- Simple configuration deployment
- Environment-based configuration path
- Minimal footprint (Alpine-based)
CONFIG_PATH: Target directory for the configuration file (default:/data/config)
Docker Run:
docker run -v /path/to/config:/data/config \
-e CONFIG_PATH=/data/config \
ghcr.io/brown-ccv/librechat-config-file:latestDocker Compose:
services:
config-copier:
image: ghcr.io/brown-ccv/librechat-config-file:latest
environment:
CONFIG_PATH: /data/config
volumes:
- ./config:/data/config- Clone this repository
- Modify
librechat-config-file/librechat.yaml - Commit and push changes
- Trigger the GitHub Action manually or push to main branch
- Deploy the new image
For generating custom configurations locally:
cd librechat-config-file
pip install -r requirements.txt
python prepare_config_file.pyThis reads template_librechat.yaml and prompt.md, then generates librechat.yaml.
A scheduled service that automatically cleans old log files from LibreChat directories.
- Configurable retention period
- Configurable log directory
- Lightweight Alpine-based image
LOG_DIR_TO_CLEAN: Directory containing logs to clean (default:/data/logs)DAYS_TO_CLEAN: Number of days to retain logs (default:180)
Docker Run:
docker run -v /path/to/logs:/data/logs \
-e LOG_DIR_TO_CLEAN=/data/logs \
-e DAYS_TO_CLEAN=180 \
ghcr.io/brown-ccv/librechat-clean-logs:latestDocker Compose:
services:
log-cleaner:
image: ghcr.io/brown-ccv/librechat-clean-logs:latest
environment:
LOG_DIR_TO_CLEAN: /data/logs
DAYS_TO_CLEAN: 180
volumes:
- ./logs:/data/logs- Docker
- GitHub account with package write permissions
Config File Service:
cd librechat-config-file
docker build -t librechat-config-file:local .Clean Logs Service:
cd librechat-clean-logs
docker build -t librechat-clean-logs:local .Both services have automated builds via GitHub Actions:
- Go to the "Actions" tab in the repository
- Select the desired workflow:
- "Build and Push Container" (for config file)
- "Build and Push Container" (for clean logs)
- Click "Run workflow"
Images are automatically pushed to GitHub Container Registry (ghcr.io).
LibreChat-utilities/
├── librechat-config-file/
│ ├── Dockerfile
│ ├── librechat.yaml # Main configuration file
│ ├── template_librechat.yaml # Template for generation
│ ├── prompt.md # Prompt content for config
│ ├── copy_config_file.sh # Deployment script
│ ├── prepare_config_file.py # Config generator (dev only)
│ └── requirements.txt # Python dependencies (dev only)
├── librechat-clean-logs/
│ ├── Dockerfile
│ └── clean_logs_script.sh # Log cleanup script
├── .github/
│ └── workflows/
│ ├── docker-build-librechat-config.yaml
│ └── docker-build-librechat-clean-logs.yaml
└── README.md
- Fork the repository
- Create a feature branch
- Make your changes
- Test locally
- Submit a pull request
[Add your license here]
Office of Information Technology
Brown University