Using LensCore from Docker Hub
LensCore is available as a pre-built Docker image on Docker Hub, allowing you to run LensCore without cloning the repository or building from source.
Quick Start
Pull and Run Latest Version
bash
docker run -d \
--name lenscore \
-p 3001:3001 \
-e PORT=3001 \
-e NODE_ENV=production \
accesstimeco/lenscore:latestUsing Environment File
Create a .env file with your configuration:
bash
docker run -d \
--name lenscore \
-p 3001:3001 \
--env-file .env \
accesstimeco/lenscore:latestWith Persistent Storage
Mount volumes for logs and storage:
bash
docker run -d \
--name lenscore \
-p 3001:3001 \
-v $(pwd)/storage:/app/storage \
-v $(pwd)/logs:/app/logs \
--env-file .env \
accesstimeco/lenscore:latestUsing Specific Version
Use a specific version tag instead of latest:
bash
docker run -d \
--name lenscore \
-p 3001:3001 \
accesstimeco/lenscore:0.1.68Verify Installation
Check that LensCore is running:
bash
curl http://localhost:3001/api/healthExpected response:
json
{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z",
"services": {
"crawling": "up",
"accessibility": "up",
"storage": "up"
}
}Stop Container
bash
docker stop lenscore
docker rm lenscoreUpdating LensCore
Update to Latest Version
bash
docker stop lenscore
docker rm lenscore
docker pull accesstimeco/lenscore:latest
docker run -d \
--name lenscore \
-p 3001:3001 \
--env-file .env \
accesstimeco/lenscore:latestUpdate to Specific Version
bash
docker stop lenscore
docker rm lenscore
docker pull accesstimeco/lenscore:0.1.76
docker run -d \
--name lenscore \
-p 3001:3001 \
--env-file .env \
accesstimeco/lenscore:0.1.76Using Docker Compose
Create a docker-compose.yml file:
yaml
version: '3.9'
services:
lenscore:
image: accesstimeco/lenscore:latest
container_name: lenscore-app
ports:
- '3001:3001'
env_file:
- .env
volumes:
- ./logs:/app/logs
- ./storage:/app/storage
restart: unless-stoppedStart services:
bash
docker-compose up -dStop services:
bash
docker-compose downProduction Setup with Redis
For production deployments with Redis caching:
yaml
version: '3.9'
services:
lenscore:
image: accesstimeco/lenscore:latest
container_name: lenscore-app
ports:
- '3001:3001'
env_file:
- .env
environment:
- CACHE_TYPE=redis
- REDIS_HOST=redis
- REDIS_PORT=6379
volumes:
- ./logs:/app/logs
- ./storage:/app/storage
depends_on:
- redis
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- '6379:6379'
volumes:
- redis_data:/data
command: redis-server --appendonly yes
restart: unless-stopped
volumes:
redis_data:Environment Variables
Configure LensCore using environment variables:
Core Settings
properties
NODE_ENV=production
PORT=3001
LOG_LEVEL=infoStorage Configuration
Local Storage:
properties
STORAGE_TYPE=local
STORAGE_PATH=./storageAWS S3:
properties
STORAGE_TYPE=s3
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=us-east-1
AWS_S3_BUCKET=your-s3-bucket-nameGoogle Cloud Storage:
properties
STORAGE_TYPE=gcs
GCS_PROJECT_ID=your-gcs-project-id
GCS_KEY_FILE_PATH=./path/to/service-account-key.json
GCS_BUCKET_NAME=your-gcs-bucket-nameCache Configuration
properties
CACHE_TYPE=redis
CACHE_TTL=3600
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0AI Configuration
properties
OPENAI_API_KEY=your-openai-api-key
OPENAI_MODEL=gpt-3.5-turbo
OPENAI_MAX_TOKENS=1000
OPENAI_TEMPERATURE=0.7Available Tags
latest- Latest stable release0.1.x- Specific version tags- Versions are automatically published when a GitHub release is created
Troubleshooting
Container Won't Start
Check container logs:
bash
docker logs lenscorePort Already in Use
Change the port mapping:
bash
docker run -d \
--name lenscore \
-p 3002:3001 \
accesstimeco/lenscore:latestPermission Issues
Ensure volumes have correct permissions:
bash
chmod -R 755 ./storage
chmod -R 755 ./logsNext Steps
- Getting Started Guide - Learn how to use LensCore
- API Documentation - Explore the REST API
- CLI Documentation - Command-line interface reference
