Deploy AdonisJS from a monorepo

Run the deploy from your repository root. Reverhost builds the Dockerfile stored on your app, using either your AdonisJS folder or the whole repository as the build context.

Last updated November 25, 2026

A self-contained app folder

If apps/api has its own lockfile and no workspace dependencies, make it the build context.

npx ezhst link --project <project-slug> --app <app-slug>
npx ezhst build set --root-dir apps/api
npx ezhst build dockerfile set -f apps/api/Dockerfile
npx ezhst deploy

With a root directory set, the Dockerfile's COPY paths are relative to apps/api, so the AdonisJS hosting Dockerfile works as is.

An app that uses workspace packages

Leave the root directory empty so the whole repository is the build context. Install at the root, build only your app, then start it from its folder.

Dockerfile
FROM node:22-alpine
WORKDIR /app
COPY . .
RUN npm ci
RUN --mount=type=secret,id=appenv,target=/run/secrets/appenv sh -c 'set -a; . /run/secrets/appenv; set +a; npx turbo run build --filter=./apps/api'
WORKDIR /app/apps/api
ENV NODE_ENV=production PORT=3000 HOST=0.0.0.0
EXPOSE 3000
CMD ["node", "build/bin/server.js"]

Nx works the same way with npx nx build <project> as the build command.

Several apps, one project

A project holds 2 apps. Create one Reverhost app per deployable folder, each with its own Dockerfile and root directory. They share the project's database and bucket.

See the AdonisJS hub for every AdonisJS guide, or free AdonisJS hosting for what is included.

Frequently asked questions

Where should I run ezhst deploy?

From the repository root, so shared packages and the lockfile are included in the upload.

Start for free

Install the skill, choose Global or Local, then tell your agent to deploy. No credit card, no config files.

$npx ezhst skill install