Skip to content

Installation

Prerequisites

  • Docker & Docker Compose
  • Git

Setup

1. Clone the repository

git clone <repo>
cd cms-api

2. Configure environment

cp .env.example .env

Edit .env with your values — at minimum change JWT_SECRET_KEY:

# Generate a secure secret
openssl rand -hex 32

3. Start services

docker compose up -d

This starts:

  • cms_postgres — PostgreSQL on port 5434
  • cms_api — FastAPI on port 8100
  • cms_docs — MkDocs on port 8200

4. Run migrations

docker compose exec api alembic upgrade head

5. Seed the database

docker compose exec api python -m app.core.seed

This creates default permissions, roles (admin, manager, viewer), and an admin user.

6. Verify

http://localhost:8100/health   → API health check
http://localhost:8100/docs     → Swagger UI
http://localhost:8200          → This documentation

Default Admin Credentials

Warning

Change these immediately in production.

Field Value
Email admin@cms.com
Password Admin1234!