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:
- PostgreSQL
- Redis
- S3-compatible storage
- reverse proxy and public domains
- a process manager such as PM2
- application env loading
Build requirements
This path assumes you can:
- install workspace dependencies
- generate Prisma client
- 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 buildMigrations
Run migrations before starting the API and worker:
pnpm db:deployThis should be done with the same DATABASE_URL that the runtime will use.
API runtime
The package script is:
pnpm --filter @remote-eaze/api startThat 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.jsWorker runtime
The package script is:
pnpm --filter @remote-eaze/queue startThat 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.jsWeb runtime
The web application is built as static assets.
That means:
- build the web app
- serve
apps/web/distfrom Nginx, Caddy, or another static file server - route
/api,/admin/redis, and/admin/queuesto 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.