A docker wrapper for feedbin/extract
215
Production-ready Docker container for feedbin/extract, a web service for extracting article content from webpages using Mercury Parser.
jez500/extract:latestappuser (UID 1001)./build.sh
This builds the image as jez500/extract:latest and displays next steps.
Then run it:
docker run -d -p 3000:3000 --name extract jez500/extract
docker-compose up --build
The service will be available at http://localhost:3000
docker build -t jez500/extract:latest .
docker run -d \
-p 3000:3000 \
--name extract \
jez500/extract:latest
GET /parser/:username/:signature?base64_url=<base64_url>
Parameters:
username: Authenticated user identifiersignature: HMAC-SHA256 signature (prevents unauthorized requests)base64_url: Base64-encoded URL of the webpage to extractExample:
curl 'http://localhost:3000/parser/user123/abc123sig?base64_url=aHR0cHM6Ly9leGFtcGxlLmNvbQ=='
GET /health
Returns 200 OK when the service is healthy.
| Variable | Default | Description |
|---|---|---|
PORT | 3000 | Port the service listens on |
NODE_ENV | production | Node.js environment (production/development) |
INSTANCES | max | Number of PM2 worker instances |
Custom Port:
docker run -d -p 8080:8080 \
-e PORT=8080 \
jez500/extract
Development Mode:
docker run -d -p 3000:3000 \
-e NODE_ENV=development \
jez500/extract
With memory limit:
docker run -d -p 3000:3000 \
-m 1g \
--name extract \
jez500/extract
With user agent:
curl -s -X POST http://localhost:3000/parser -H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"options": {
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
}
}
}' | jq .
This Docker image includes several security hardening measures:
appuser (UID 1000)node:20-slim for reduced attack surfaceThe Docker image includes:
extract-docker/
├── Dockerfile # Docker image definition
├── build.sh # Build script (creates jez500/extract image)
├── docker-compose.yml # Docker Compose configuration
├── docker-entrypoint.sh # Container startup script
├── ecosystem.config.js # PM2 process configuration
├── test-api.sh # API testing script
├── Makefile # Convenient make targets
├── README.md # This file
├── CLAUDE.md # Implementation details
├── .dockerignore # Docker build exclusions
└── .gitignore # Git exclusions
Application logs are available via Docker:
docker logs extract
# Follow logs in real-time
docker logs -f extract
docker logs extract
Check the logs for errors. Common issues:
PORT env var or -p mapping)The service may need extra time to start. The health check has a 20-second grace period (start_period).
Ensure the port mapping is correct:
docker port extract
make build # Build Docker image
make up # Start service with docker-compose
make down # Stop service
make logs # View logs (follow mode)
make test # Test health endpoint
make clean # Remove image and containers
make help # Show all targets
Using the build script:
./build.sh
Or manually:
docker build -t jez500/extract:latest .
If you have push permissions to jez500/extract:
docker push jez500/extract:latest
Or with a registry environment variable:
IMAGE_REGISTRY=docker.io make push
This Docker wrapper follows the same license as feedbin/extract.
Content type
Image
Digest
sha256:bbc39ca7c…
Size
127.9 MB
Last updated
5 months ago
docker pull jez500/extract