Project Configurations
ReactPress describes a site with .reactpress/config.json and a root .env. reactpress init generates both. End users default to embedded SQLite — no Docker required.
Desktop local mode uses a separate site directory (e.g.
.reactpress/desktop-dev-site/) with a SQLite.env(DB_TYPE=sqlite). See desktop/README.md.
.reactpress/config.json (default: SQLite)
Typical structure written by reactpress init:
{
"version": 1,
"database": {
"mode": "embedded-sqlite",
"sqlitePath": "reactpress.db"
},
"server": {
"port": 3002,
"apiPrefix": "/api",
"siteUrl": "http://127.0.0.1:3002",
"clientUrl": "http://localhost:3001",
"serverUrl": "http://127.0.0.1:3002"
}
}
database.mode: defaultembedded-sqlite; optionalembedded-dockeror external MySQL modes- End users: edit
config.json/.env, thenreactpress stop→reactpress init(or restart running processes) - Monorepo contributors can use the full CLI
reactpress config/config --apply(not on the global npm CLI)
.env (auto-generated)
Loaded from the project root. SQLite default example:
DB_TYPE=sqlite
DB_DATABASE=reactpress.db
SERVER_PORT=3002
SERVER_SITE_URL=http://127.0.0.1:3002
CLIENT_SITE_URL=http://localhost:3001
SERVER_API_PREFIX=/api
ADMIN_USER=admin
ADMIN_PASSWD=admin
Change ADMIN_* for production and set CLIENT_SITE_URL / SERVER_SITE_URL to public URLs.
Optional: MySQL / Docker
- Set
database.modeinconfig.jsontoembedded-dockeror an external DB profile and fill connection fields - Monorepo:
pnpm docker:devfor embedded MySQL, then sync config with the full CLI - Run
reactpress doctorto verify connectivity
See Docker deployment, CLI reference, and ReactPress 4.0 Extend.