Using Docker Compose allows for advanced configuration of environment variables such as cache types and expiration times.
Deployment Steps:
- Configure the
docker-compose.yml file. - Create a persistent volume for Redis:
docker volume create redis-data. - Start the services with
docker-compose up -d (and stop with docker-compose down).
version: "4"
services:
cat_legalhub:
image: legalgeek/cat:1.1 # Replace with the latest version
restart: always
ports:
- "1400:1200"
environment:
NODE_ENV: production
CACHE_TYPE: redis
REDIS_URL: "redis://redis:6379/"
PUPPETEER_WS_ENDPOINT: "ws://browserless:3000"
CACHE_EXPIRE: 360
CACHE_CONTENT_EXPIRE: 86400
depends_on:
- redis
- browserless
browserless:
image: browserless/chrome
restart: always
ulimits:
core:
hard: 0
soft: 0
redis:
image: redis:alpine
restart: always
volumes:
- redis-data:/data
volumes:
redis-data: