42 lines
983 B
YAML
42 lines
983 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
pdf-service:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: html-to-pdf-service
|
|
ports:
|
|
- "5000:5000"
|
|
environment:
|
|
- ASPNETCORE_ENVIRONMENT=Production
|
|
- PdfService__BrowserPool__MaxInstances=10
|
|
- PdfService__BrowserPool__MinInstances=2
|
|
- PdfService__BrowserPool__MaxConcurrent=5
|
|
- PdfService__Storage__SaveLocalCopy=true
|
|
- PdfService__Storage__LocalPath=/app/pdfs
|
|
- PdfService__Callback__Enabled=true
|
|
- PdfService__Callback__DefaultUrl=
|
|
volumes:
|
|
- pdf-storage:/app/pdfs
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 2G
|
|
cpus: '2'
|
|
reservations:
|
|
memory: 1G
|
|
cpus: '1'
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
pdf-storage:
|
|
driver: local
|
|
|