Local Deployment Guide
This guide explains how to run BarakoCMS locally on your machine. We support two modes:
- Production Simulation (Recommended for testing the deployment stack).
- Development Mode (For contributing code).
1. Production Simulation (Full Stack)
Run the entire stack (API, Admin UI, Database, Reverse Proxy) exactly as it would run on a Cloud VM, but on your local machine using Docker.
How to Run
We have an automated script that sets up local domains using 127.0.0.1.nip.io.
- Prerequisites: Docker Desktop (or Engine) installed and running.
- Run the Script:bash
./scripts/run-local.sh
What Happens?
- It generates a
.envfile with local secrets. - It configures Caddy to serve HTTPS on local domains.
- It builds the Next.js Admin UI and .NET API.
- It starts the containers.
Accessing the App
Once the script finishes:
- Admin Dashboard: https://admin.127.0.0.1.nip.io
- API Endpoint: https://api.127.0.0.1.nip.io
Note: Your browser will warn you about "Self-Signed Certificates". This is normal for localhost. Click "Advanced" -> "Proceed to localhost (unsafe)" to continue.
2. Development Mode
If you want to modify code and see changes instantly (Hot Reload), run the services directly on your machine.
Prerequisites
- .NET 8 SDK
- Node.js 18+
- Docker (for Database only)
Steps
Start Database:
bashdocker compose up -d postgresRun API:
bashcd barakoCMS dotnet runAPI will listen on
http://localhost:5005Run Admin UI:
bashcd admin npm install npm run devUI will listen on
http://localhost:3000