remoteEaze
Deployment

PM2 and Manual Runtime

Run the API and worker without compose-managed infrastructure, using your own Postgres, Redis, reverse proxy, and process manager.

Last updated

This path is for operators who want to manage the runtime directly instead of using a compose-managed stack.

What you must provide yourself

Unlike the compose paths, this path does not create:

  • PostgreSQL
  • Redis
  • reverse proxy
  • TLS
  • container restart policies

You must provide:

  1. PostgreSQL
  2. Redis
  3. S3-compatible storage
  4. reverse proxy and public domains
  5. a process manager such as PM2
  6. application env loading

Build requirements

This path assumes you can:

  1. install workspace dependencies
  2. generate Prisma client
  3. build the API, worker, and web assets

Typical build preparation:

pnpm install
pnpm db:generate
pnpm --filter @remote-eaze/api build
pnpm --filter @remote-eaze/queue build
pnpm --filter @remote-eaze/web build

Migrations

Run migrations before starting the API and worker:

pnpm db:deploy

This should be done with the same DATABASE_URL that the runtime will use.

API runtime

The package script is:

pnpm --filter @remote-eaze/api start

That script uses infisical run internally.

If you are not using Infisical, run the underlying Node command directly from apps/api with env already exported:

node --enable-source-maps --import ./dist/telemetry.js dist/main.js

Worker runtime

The package script is:

pnpm --filter @remote-eaze/queue start

That script also uses infisical run internally.

If you are not using Infisical, run the underlying Node command directly from packages/queue with env already exported:

node --enable-source-maps --import ./dist/telemetry.js dist/worker.js

Web runtime

The web application is built as static assets.

That means:

  1. build the web app
  2. serve apps/web/dist from Nginx, Caddy, or another static file server
  3. route /api, /admin/redis, and /admin/queues to the API service

PM2 shape

PM2 is a process manager, not an infrastructure creator. Treat it as the supervisor for:

  • API process
  • worker process

The static web assets should still be served by a real web server or reverse proxy.

When this path is a good fit

Choose this path when:

  • your organization already standardizes on PM2 or a similar process manager
  • PostgreSQL and Redis already exist externally
  • you want full control over reverse proxy, runtime layout, and restart behavior

When to choose a compose path instead

Choose a compose path when you want the repository to create and wire together:

  • PostgreSQL
  • Redis
  • migration lifecycle
  • image/runtime boundaries

Next step

Continue with Routing and Domains and then Post-Deploy Bootstrap.

On this page