ForgeCMS is a Flask-based blogging and CMS application backed by MariaDB. It includes authentication, an admin workflow for draft/scheduled/published content, Markdown authoring, and media upload support.
- User registration and login
- Admin content management experience
- Post workflow states (
draft,scheduled,published,archived) - Preview support for unpublished posts
- SEO-friendly slugs and Bootstrap-based responsive UI
- Image upload support for post media
app/– Flask application package (blueprints, models, app factory)templates/– Jinja2 HTML templatesstatic/– CSS and uploaded/static assetsmigrations/– Database migration artifacts (includingmigrations/manual/SQL files)wsgi.py– WSGI entrypointDockerfile– Production image definitiondocker-compose.yml– Default single-server deploymentdocker-compose.enterprise.yml– Enterprise multi-instance deploymentdocker/– Container helper scripts and NGINX configuration
- Python 3.8+
- Flask
- SQLAlchemy + Flask-Migrate
- MariaDB 10.5+
- Bootstrap 5
- Docker / Docker Compose
- Docker Engine 24+
- Docker Compose v2+
cp .env.example .envUpdate at least:
SECRET_KEYDB_PASSWORDDB_ROOT_PASSWORD
Runs one ForgeCMS container plus one MariaDB container on one host.
docker compose up -d --build- ForgeCMS:
http://localhost:8000 - Persistent data:
mariadb_datavolume for DBuploads_datavolume for media uploads
Stop:
docker compose downRuns two ForgeCMS app instances behind NGINX plus one MariaDB server.
docker compose -f docker-compose.enterprise.yml up -d --build- Entry point:
http://localhost(port 80) - Backend app containers:
forgecms-a,forgecms-b - Shared uploads volume mounted by both app containers and NGINX
Stop:
docker compose -f docker-compose.enterprise.yml down- Container startup waits for MariaDB before launching the app.
- Database migrations run automatically at startup.
- In enterprise mode, only
forgecms-aruns migrations.
- In enterprise mode, only
UPLOAD_FOLDERdefaults tostatic/uploadsand is persisted in Docker volumes.
git clone <repository-url>
cd forgecmspython -m venv venv
# Linux/macOS
source venv/bin/activatepip install -r requirements.txtCREATE DATABASE forgecms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'forgecms'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON forgecms.* TO 'forgecms'@'localhost';
FLUSH PRIVILEGES;cp .env.example .envflask db upgradeflask runBy default, Flask serves on http://127.0.0.1:5000.
flask shellfrom app import db
from app.models import User
admin = User(username='admin', email='admin@example.com', is_admin=True)
admin.set_password('your-secure-password')
db.session.add(admin)
db.session.commit()