add an alternative to browserless, for lightweight servers

This commit is contained in:
Amruth Pillai
2026-01-21 23:24:37 +01:00
parent 4d72a953dd
commit 5d73998f82
9 changed files with 120 additions and 86 deletions
+24 -22
View File
@@ -17,22 +17,32 @@ services:
timeout: 10s
retries: 3
gotenberg:
image: gotenberg/gotenberg:8
browserless:
image: ghcr.io/browserless/chromium:latest
restart: unless-stopped
ports:
- "4000:3000"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- WEBHOOK_DISABLE=true
- CHROMIUM_AUTO_START=true
- LIBREOFFICE_DISABLE_ROUTES=true
- PROMETHEUS_DISABLE_COLLECT=true
- QUEUED=10
- HEALTH=true
- CONCURRENT=20
- TOKEN=1234567890
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
start_period: 10s
interval: 30s
timeout: 10s
retries: 3
test:
["CMD", "curl", "-f", "http://localhost:3000/pressure?token=1234567890"]
interval: 10s
timeout: 5s
retries: 10
# As an alternative to browserless, you can also use a lightweight image like chromedp/headless-shell:latest
# See https://docs.rxresu.me/self-hosting/docker#alternative-printer-options for more information.
# chrome:
# image: chromedp/headless-shell:latest
# restart: unless-stopped
# ports:
# - "9222:9222"
seaweedfs:
image: chrislusf/seaweedfs:latest
@@ -74,7 +84,8 @@ services:
- APP_URL=http://localhost:3000
- PRINTER_APP_URL=http://app:3000
# Printer
- GOTENBERG_ENDPOINT=http://gotenberg:3000
- PRINTER_ENDPOINT=ws://browserless:3000?token=1234567890
# - PRINTER_ENDPOINT=http://chrome:9222 # Or, if you're using chromedp/headless-shell
# Database
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/postgres
# Authentication
@@ -97,16 +108,7 @@ services:
seaweedfs-create-bucket:
condition: service_completed_successfully
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:3000/api/health",
"||",
"exit",
"1",
]
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
start_period: 10s
interval: 30s
timeout: 10s