Skip to content

Latest commit

 

History

History
93 lines (73 loc) · 2.67 KB

QuickStart.md

File metadata and controls

93 lines (73 loc) · 2.67 KB

Quick Start Guide

This guide will help you run the Espresso service using Docker Compose.

Prerequisites

  • Docker and Docker Compose
  • Make (optional)

Running the Service

  1. All required files are already provided in the repository:

    • HTML templates in service/inputfiles/templates/
    • Sample PDFs in service/inputfiles/inputPDFs/
    • Test certificates in service/inputfiles/certificates/
    • Configuration in configs/espressoconfig.yaml
  2. Build and start all containers using make

make

or directly run docker compose from root

	DOCKERFILE=service/Dockerfile \
    docker-compose -f service/docker-compose.yml build && \
    docker-compose -f service/docker-compose.yml up -d 

then open http://localhost:3000 on a browser to access the espresso console

This will:

  • Build all Docker containers
  • Start MySQL for template storage
  • Initialize LocalStack for S3 storage
  • Launch the PDF service
  • Start the web UI
  • Open http://localhost:3000 in your browser

Using the Web UI

  1. Template Management:

    • Go to http://localhost:3000/templates
    • Click "Create New Template"
    • Fill in:
      • Template Name
      • HTML Content
      • JSON Schema (for form fields, placeholders, images, etc)
    • Click "Save Template"
  2. Generate PDF:

  3. Sign PDF:

Troubleshooting

  1. Certificate Issues:

    • Verify certificate files exist in the specified path
    • Check certificate password in config
    • Ensure certificate format is correct (X.509 for cert, PKCS#8 for key)
  2. Storage Issues:

    • For disk storage: Check file permissions
    • For S3: Verify LocalStack is running (docker ps)
    • For MySQL: Check connection string in config
  3. Template Issues:

    • Verify HTML is valid
    • Check JSON schema matches your data
    • Templates must be accessible from configured storage
  4. Common Errors:

    • "Template not found": Check storage configuration
    • "Certificate load failed": Verify certificate paths and passwords
    • "PDF generation failed": Check HTML template validity
    • "Storage error": Verify storage configuration and permissions

Next Steps

  • Check the API documentation for more endpoints
  • Review the Integration Guide for programmatic usage
  • Explore advanced features like custom headers/footers
  • Configure production settings for deployment

For more detailed information, refer to the Integration Guide.