DocumentionUmo Office ConvertDeployment & Run

Deployment and Runtime Guide

Prerequisites

  • Node.js 18+ (recommended)
  • MySQL 5.7+/8.0+
  • Optional: PM2 or Docker

Start the Project

  1. Install dependencies: npm install
  2. Configure environment variables: copy .env.example to .env and update values
  3. Start: npm start
  4. Visit:
    • Health: http://localhost:[PORT]/
    • Swagger UI (non-production): http://localhost:[PORT]/openapi

PM2 Deployment

Use ecosystem.config.cjs:

npm i -g pm2
pm2 start ecosystem.config.cjs --env production
pm2 status
pm2 logs
  • Logs: logs/
  • Stop: pm2 stop umo-office-convert

Docker

See Docker Deployment.

  • Note: expose the MySQL service to the container and ensure it is reachable (for example, use host networking or container networking).

Database Preparation

  • Create the database and user (example):
    CREATE DATABASE IF NOT EXISTS `umo_office_convert` DEFAULT CHARACTER SET utf8mb4;
    CREATE USER 'convert_user'@'%' IDENTIFIED BY 'strong_password';
    GRANT ALL PRIVILEGES ON `umo_office_convert`.* TO 'convert_user'@'%';
    FLUSH PRIVILEGES;
  • After the service starts, it will automatically create the convert_tasks table.

Runtime Directories

  • Original file storage directory (optional)
  • Converted document storage directory
  • Log directory

Production Recommendations

  • Use object storage (S3/OSS) instead of local disks.
  • Enable HTTPS and rate limiting via a reverse proxy (such as Nginx).
  • Adjust MAX_FILE_SIZE and FILE_HASH_ALGORITHM to fit business needs.