-
Start the services:
docker-compose up -d
-
Test the service:
curl "http://localhost:8080/cover?id=9780415480635&provider=gb,aws,ol"
The Docker container generates its configuration from environment variables at startup. No config.json file is needed!
Copy .env.example to .env and customize:
cp .env.example .envKey variables:
COCE_PORT- Server port (default: 8080)COCE_PROVIDERS- Comma-separated list of providers (default: gb,aws,ol)REDIS_HOST- Redis hostname (default: redis)COCE_CACHE_PATH- Local cache directory (default: /app/covers)COCE_ORB_USER/COCE_ORB_KEY- ORB credentials (optional)
See .env.example for all available options.
- coce: The main application (port 8080)
- redis: Redis cache server (port 6379)
redis_data: Persistent Redis datacoce_covers: Cached cover images
To rebuild after code changes:
docker-compose up --buildTo view logs:
docker-compose logs -f coceTo stop services:
docker-compose downTo stop and remove volumes:
docker-compose down -vFor production, override environment variables:
# Using environment file
docker-compose --env-file .env.prod up -d
# Or set variables directly
COCE_PROVIDERS=gb,aws,ol,orb \
COCE_ORB_USER=myuser \
COCE_ORB_KEY=mykey \
docker-compose up -d