Last updated: 2026-03-30 Service owner: ODS Platform Team Pipeline status: STAGING_VERIFIED
PDF Engine is a microservice for PDF generation and template management. It supports template CRUD with per-tenant isolation, PDF rendering from templates, and publishes events to Redpanda. Supports both RS256 (production) and HS256 (dev-only) JWT verification.
| Property | Value |
|---|---|
| Language | Rust (Actix-web) |
| Container port | 8080 |
| DB schema | pdf on ods database |
| Event bus topic | events.pdf-engine |
| Coolify app UUID | tgssoogso84sks80g0ckgg8w |
Endpoint: GET /health Expected
response: HTTP 200
curl -sf https://pdf-engine.staging.orbusdigital.com/healthhttps://pdf-engine.staging.orbusdigital.com
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | postgres://ods:***@ods-postgres:5432/ods |
HOST |
No | Bind address (default 0.0.0.0) |
PORT |
No | Listen port (default 8082, exposed as 8080
in container) |
JWT_RSA_PUBLIC_KEY |
Prod | PEM-encoded RSA public key from OID |
JWT_ISSUER |
Yes | Token issuer URL |
JWT_AUDIENCE |
Yes | ods-pdf-engine |
JWT_ALLOW_HS256 |
Dev only | Set true for HS256 mode (NEVER in prod/staging) |
JWT_SECRET |
Dev only | HS256 secret (min 32 chars) |
CORS_ALLOWED_ORIGINS |
No | Comma-separated allowed origins |
JSON_BODY_LIMIT_BYTES |
No | Max JSON body size (default 1MB) |
REDPANDA_BROKERS |
No | Kafka broker (default in-memory) |
REDPANDA_TOPIC |
No | Event topic |
source ~/.env.adlc 2>/dev/null
curl -sf -X POST "https://app.coolify.io/api/v1/applications/tgssoogso84sks80g0ckgg8w/restart" \
-H "Authorization: Bearer $COOLIFY_TOKEN"Push to the staging branch of
ljniox/pdf-engine. Coolify auto-deploys.
# On srv-staging (35.195.54.220):
docker logs --tail 200 -f $(docker ps -qf "label=coolify.applicationId=tgssoogso84sks80g0ckgg8w")Symptom: HTTP 409 when creating a template with a name that already exists for the tenant.
Fix: This is expected behavior. Template names are unique per tenant. Use a different name or update the existing template.
Symptom: Security review flags HS256 in staging.
Fix: Remove JWT_ALLOW_HS256 from
Coolify env vars. Ensure JWT_RSA_PUBLIC_KEY is set to OID’s
public key.
Symptom: Request times out for complex templates.
Fix: Check container resource limits in Coolify. Consider increasing timeout or breaking the template into smaller sections.
docker restart $(docker ps -qf "label=coolify.applicationId=tgssoogso84sks80g0ckgg8w")| Dependency | Type | Details |
|---|---|---|
| PostgreSQL 17 | Database | ods-postgres:5432, schema pdf |
| Redpanda | Event bus | redpanda:9092, topic events.pdf-engine
(optional) |
| OID | Auth | RSA public key or JWKS for JWT verification |