Static sites and SPAs
Deploy a Docusaurus site on Enzonic
Docusaurus builds a static documentation site into build. Deploy serves it from the edge and gives every branch a preview URL, which makes reviewing docs changes in pull requests straightforward.
At a glance
What Enzonic Deploy does with a Docusaurus project when you connect it. You can override any of it in the project settings.
- Language
- JavaScript / TypeScript
- Detected from
- @docusaurus/core in dependencies
- Build command
- docusaurus build
- Output
- build
- Runs as
- Static
Dependencies install with the package manager your lockfile names: npm ci, pnpm install --frozen-lockfile, yarn install --immutable (Berry) or --frozen-lockfile, or bun install --frozen-lockfile. Node.js 18, 20, 22 and 24 are available. Deploy reads engines.node in package.json, then .nvmrc or .node-version, and uses Node.js 22 when nothing pins a version.
How it runs
Static
Always.
Deploy Docusaurus step by step
- 1Set url and baseUrl in docusaurus.config to your production domain and "/".
- 2Connect the repository and deploy.
- 3Add your own docs domain under the project's Domains.
export default {
title: 'My docs',
url: 'https://docs.example.com',
baseUrl: '/',
trailingSlash: false,
// ...presets, themeConfig
};Connect a database to Docusaurus
Create a database on Enzonic Databases (or from the project's settings) and its connection string is added to the project's environment variables. This example uses PostgreSQL.
import pg from 'pg';
const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL });
export async function POST(request) {
const { page, helpful } = await request.json();
await pool.query('insert into feedback (page, helpful) values ($1, $2)', [page, !!helpful]);
return new Response(null, { status: 204 });
}Postgres projects get two variables: DATABASE_URL through the connection pooler for the app, and DATABASE_URL_UNPOOLED for migrations.
PostgreSQL on Enzonic DatabasesEvery database engineThings to know
- A wrong baseUrl is the usual cause of unstyled pages after deploying; it must match the path the site is served from.
Plan limits that matter here
From the live plan data. Every plan includes previews for each branch, instant rollback, environment variables and logs.
| Limit | Free | Pro |
|---|---|---|
| Build minutes | 3,000/mo, 1 concurrent | 10,000/mo, 3 concurrent |
| Function memory / timeout | 1 GB / 300 s | 4 GB / 1800 s |
| Function invocations | 2 M/mo | 20 M/mo |
| Bandwidth | 150 GB/mo | 2 TB/mo |
Related guides
- Deploy a Astro siteStatic Astro sites by default, server output with @astrojs/node.
- Deploy a Gatsby siteGatsby sites built with gatsby build and served from public.
- Deploy a Eleventy siteEleventy (11ty) sites built into _site.
Ship your Docusaurus project tonight
Connect the repository and the build settings fill themselves in. Free plan, no card.