Die Management System
Local Area Network (LAN) platform for die tracking, inventory management, and audit histories.
DMS-O2 tracks precision drawing dies, machine allocations, and monthly inventory counts across manufacturing shop floors.
- Overview & Architecture
- Core Workspaces
- Key Features
- Technology Stack
- Quick Start
- Deploy with Docker (No Source Code)
- Configuration
- Project Structure
- Usage Guide
- Deployment & Upgrades
- Backup & Recovery
- Security
- Client & User Access Installation Guide
- Roadmap
- FAQ
- Troubleshooting
- Licensing & Compliance
- Contributing
- Support
- Credits
DMS-O2 uses a hybrid query execution design: fuzzy text searches route to Meilisearch, while numeric range queries run directly on PostgreSQL. The architecture delivers sub-millisecond read latency over LAN.
graph TD
User([LAN Operator / Admin]):::client -->|HTTP/HTTPS| Traefik[Traefik v3 Reverse Proxy]:::proxy
subgraph Container Stack [Container Stack]
Traefik -->|/api/go/*| GoAPI[Go Search API Microservice]:::backend
Traefik -->|/api/* & /admin/*| Django[Django 4.2 Web Server]:::backend
Traefik -->|/*| Nginx[Nginx Static Frontend Server]:::proxy
Django -->|Celery Workers| Celery[Celery Tasks]:::celery
Django -->|Relational SQL / Audit Signals| Postgres[(PostgreSQL 18)]:::db
GoAPI -->|Fuzzy Lookup| Meili[(Meilisearch v1.7)]:::db
GoAPI -->|Cache Store| Redis[(Redis 7)]:::db
GoAPI -->|Range Queries| Postgres
Postgres -->|LISTEN/NOTIFY Cache Invalidation| GoAPI
end
classDef client fill:#e0f2fe,stroke:#0284c7,stroke-width:2px,color:#0369a1;
classDef proxy fill:#ecfdf5,stroke:#059669,stroke-width:2px,color:#047857;
classDef backend fill:#f5f3ff,stroke:#7c3aed,stroke-width:2px,color:#6d28d9;
classDef db fill:#fffbeb,stroke:#d97706,stroke-width:2px,color:#b45309;
classDef celery fill:#fdf2f8,stroke:#db2777,stroke-width:2px,color:#be185d;
See docs/ARCHITECTURE.md for architectural specifications.
| Workspace | Primary Purpose | Key Capabilities |
|---|---|---|
| Die Tracking Dashboard | Real-time plant telemetry & status cards | KPI stats with glow borders, search bar with autocomplete, status donut breakdown, maintenance queue |
| Die Inventory | Master registry for round & flat dies | Filter by status/casing/machine, CAD vector blueprint sync, 2D/3D visual inspection |
| Machine Sets | Machine allocations & rack placement | Drag-and-drop storage rack map, set configuration, operational active/inactive ratio |
| Die Set Planner | Engineering capacity & procurement | Preset series calculators, bottleneck deficit analysis, recount sheets, Excel/CSV audit import |
| Engineering Suite | Wire drawing & sizing physics engine | Siebel's force formula, elongation analysis, 3D von Mises stress heatmap, PDF/Excel export |
| Audit History | Immutable field-level change ledger | Trigger-backed change history, timestamps, operator identity, exportable audit trail |
| Settings & Security | System administration & access control | System theme switcher, 2FA setup, wear tolerance alert limits, database backup/restore |
- Triple System Themes: Real-time instant switching between Classic Slate (vibrant industrial midnight UI with glowing KPI status cards), Dark Terminal (high-density Bloomberg monospace), and Precision Light (clean high-contrast daylight mode).
- Precision Die Modeling: Custom tracking templates for round dies (casing, current size, original size) and flat dies (width, thickness, corner radius). Supports statuses:
AVAILABLE,RUNNING,CLEANING,POLISHING,DAMAGED,SCRAPPED,MISSING,MAINTENANCE. - Modular Die Set Planner & Capacity Engine: Multi-source stock ingestion (DMS database, live enamel machines, monthly audit recount sheets), bottleneck deficit analytics, series capacity planning, and target set procurement forecasting with 5-decimal precision.
- Enamel Machine Tracking & Monthly Recount Audit Sheets: Machine die allocation ledger and spreadsheet-grade monthly physical inventory audit sheets with Excel/CSV drag-and-drop import and discrepancy reports.
- Single-Use Backup Codes Authentication: Cryptographically hashed (SHA-256) one-time recovery codes for secondary sign-in security without requiring mobile authenticator apps.
- Real-Time Live SSE Event Distribution: Redis Pub/Sub multiplexing PostgreSQL
LISTEN/NOTIFYevents across multi-container instances with automatic local fallback. - Interactive CAD Highlighting: Bidirectional vector sync between table dimensions and blueprint SVG nodes.
- Visual Storage Rack Map: Drag-and-drop grid interface for physical warehouse rack management.
- Fuzzy & Parametric Search: Sub-millisecond lookups via Go microservice with Redis caching, PostgreSQL range queries, and Meilisearch.
- Granular Role-Based Access Control (RBAC):
- Unauthenticated / Operator: Read-only search, metrics, and inventory browsing.
- Admin: Full CRUD on dies, machines, and sets, plus bulk spreadsheet imports.
- Root: User administration, database backup/restore, and system configuration.
- Immutable Auditing: Database triggers and Django signals capture all modifications to die status, location, and dimensions.
- Session Management: Single active session enforcement with immediate revocation on new sign-in.
- Sheet-to-Database Import: Validation-backed, idempotent CSV/Excel import system.
- 3D Stress Analysis: WebGL von Mises stress heatmaps with angle/bearing sliders, cutaway planes, crack defect overlays, and snapshot export.
- Engineering Workbench: CAD geometry inspector, deformation simulator, Siebel's force calculations, and trade-off comparison matrices.
- Granular Tool Permissions: Per-user feature toggles with real-time background auth sync.
- Frontend Resilience: Automatic chunk load error recovery and update fallback handling.
- Engineering Calculators: Sizing & elongation calculator, wire drawing calculator with interactive results, and PDF/Excel/CSV exports.
| Layer | Component | Version | Role / Purpose |
|---|---|---|---|
| Frontend UI | React, Vite, Vanilla CSS | React 18, Vite |
Single Page Application (SPA) dashboard |
| Backend API | Django & Django REST Framework | Python 3.11, Django 4.2 |
Core business logic, RBAC policies, mutating transactions |
| Search Gateway | Go (Golang) | Go 1.22 |
Ultra-fast read-only query processing & cache management |
| Relational DB | PostgreSQL | PostgreSQL 18 |
Primary relational store & immutable auditing |
| Fuzzy Index | Meilisearch | v1.7 |
Typo-tolerant text index for rapid search |
| Memory Cache | Redis | v7 (Alpine) |
Query caching & Celery broker |
| Ingress Router | Traefik | v3 |
Automated HTTPS TLS termination & reverse proxy |
| Testing | Vitest, Playwright, PyTest | — | Front-to-back unit, integration, and E2E coverage |
Ensure you have the following installed on your host machine:
- Docker & Docker Compose (V2+): On Linux, configure your user to access the Docker daemon without
sudo:sudo usermod -aG docker $USER # Log out and log back in for changes to take effect
- mkcert / OpenSSL: Required for local TLS certificate generation. If
mkcertis missing or blocked by Windows Application Control policies (AppLocker/WDAC), the setup script automatically falls back to Git OpenSSL. - Node.js (v18+) & npm: Only required if running the frontend locally outside Docker.
- Python 3.11: Only required if running Django commands locally outside Docker.
Choose the command matching your host operating system:
| Operating System | Install Command |
|---|---|
| Linux (Fedora/RHEL) | sudo dnf install mkcert |
| Linux (Debian/Ubuntu) | sudo apt install mkcert |
| macOS (Homebrew) | brew install mkcert |
| Windows (Chocolatey) | choco install mkcert |
Alternatively, download binaries directly from the official releases.
The setup scripts automate container builds, database initialization, and certificate generation.
chmod +x setup.sh
./setup.shYou can double-click setup.bat or run:
setup.batOr run directly in PowerShell (execution policy is automatically bypassed for the session):
.\setup.ps1Tip
Using Make
A Makefile is provided for developer convenience. Run make help to see all available targets (setup, certs, start, stop, logs, backup, etc.).
Tip
LAN Network Access
On completion, the setup scripts output your server's LAN IP address (e.g., https://192.168.1.15). Any device on the same local network can access the dashboard. To remove SSL browser warnings on client machines, see Client & User Access Installation Guide.
If you prefer to configure the steps manually:
- Environment Settings:
cp .env.example .env
- Generate TLS Certificates:
Or generate directly with
# Windows scripts\generate-certs.bat # Linux/macOS chmod +x scripts/generate-certs.sh ./scripts/generate-certs.sh
mkcert(replaceYOUR_LAN_IP):mkcert -install mkcert -cert-file certs/cert.pem -key-file certs/key.pem localhost 127.0.0.1 YOUR_LAN_IP ::1
- Start Services:
docker compose up -d --build
- Run Database Migrations & Seeds:
docker compose exec django python manage.py migrate docker compose exec django python manage.py create_root_user
- Sync Search Indexes:
docker compose exec django python manage.py sync_search
- Frontend SPA: https://localhost
- Django Admin Console: https://localhost/admin/
- REST API Root: https://localhost/api/
- Default Credentials: Automatically generated by
setup.sh(saved in your.envfile).
Note
DMS-O2 forces HTTPS by default. The setup scripts automatically generate TLS certificates for your LAN IP using mkcert or OpenSSL. All plain HTTP requests are automatically redirected to HTTPS.
Deploy DMS-O2 using pre-built images without cloning the repository:
mkdir dms && cd dms
curl -LO https://raw.githubusercontent.com/sauryah/dms-o2/main/docker-compose.ghcr.yml
curl -LO https://raw.githubusercontent.com/sauryah/dms-o2/main/.env.example
cp .env.example .env # ← Edit passwords and secret keys here!
docker compose -f docker-compose.ghcr.yml up -dFor detailed production deployment instructions, including Windows PowerShell/Command Prompt scripts, automated backups, and version pinning, review the Docker Deployment Guide.
System variables managed in the .env file at the project root.
Warning
Ensure all secret keys and passwords are changed in production environments. Never commit .env files to git repositories.
| Key | Default Value | Description |
|---|---|---|
POSTGRES_DB |
dms |
Target PostgreSQL database name. |
POSTGRES_USER |
dms_user |
Database user account. |
POSTGRES_PASSWORD |
your_db_password |
Database access password. |
POSTGRES_HOST |
db |
Database service host inside the Docker network. |
POSTGRES_PORT |
5432 |
PostgreSQL network port. |
REDIS_PASSWORD |
change_me_redis_password |
Redis auth password (must match broker/backend URL). |
DJANGO_SECRET_KEY |
your-secret-key |
Django secret key for session signing and CSRF protection. |
INTERNAL_API_SECRET |
your-internal-secret |
Shared secret for Django ↔ Go API communication. |
CELERY_BROKER_URL |
redis://:change_me_redis_password@redis:6379/0 |
Redis connection URL for Celery message broker. |
CELERY_RESULT_BACKEND |
redis://:change_me_redis_password@redis:6379/0 |
Redis connection URL for Celery task results. |
MEILI_HOST |
http://meilisearch:7700 |
Search service connection endpoint. |
MEILI_MASTER_KEY |
auto-generated | Meilisearch authorization key. |
ROOT_USERNAME |
root |
Superuser username. |
ROOT_PASSWORD |
(generated by setup.sh) | Default administrator password. |
SESSION_IDLE_TIMEOUT_MINUTES |
30 |
Minutes before idle session expires. |
SESSION_ABSOLUTE_TIMEOUT_HOURS |
12 |
Absolute hours before user is forced to log in again. |
dms-o2/
├── .github/workflows/ # CI/CD Deployment configurations
├── .githooks/ # Git hooks (pre-commit linting & secret detection)
├── backend/ # Django Backend Service
│ ├── dms/ # Core settings, URLs, Celery config
│ ├── dies/ # Die models, signals, viewsets, services (recut, wear, import, search, validation)
│ ├── history/ # Audit logging (DieHistory, MachineHistory) and views
│ ├── machines/ # Assets (Categories, Machines, Sets, Racks)
│ ├── search/ # Celery Meilisearch indexing tasks and outbox processor
│ └── users/ # RBAC, auth views, permissions, session management
├── certs/ # TLS certificates (generated, gitignored)
│ ├── cert.pem # Server certificate for current LAN IP
│ ├── key.pem # Private key
│ └── rootCA.pem # Root CA (install on client machines)
├── go-api/ # Go Search & Stats Microservice
│ ├── cmd/server/main.go # API routes and Redis invalidation cache logic
│ └── Dockerfile # Multi-stage container file
├── frontend/ # React Frontend Single Page Application
│ ├── src/ # UI components, layout grids, hooks, contexts
│ ├── features/ # Feature-specific components (inventory, dashboard, wire-drawing-calculator)
│ └── Dockerfile.prod # Production static Nginx configuration
├── scripts/ # Utility scripts
│ ├── generate-certs.sh # Auto-generate TLS certs (Linux/macOS)
│ ├── generate-certs.bat # Auto-generate TLS certs (Windows)
│ ├── uninstall-certs.sh # Uninstall Root CA and delete certs (Linux/macOS)
│ ├── uninstall-certs.bat # Uninstall Root CA and delete certs (Windows)
│ ├── client-install-template.bat # Windows installer script template
│ ├── client-install-template.sh # macOS/Linux installer script template
│ ├── client-instructions-template.txt # Client cert installation instructions template
│ ├── install-cert.bat # Install rootCA on Windows clients
│ ├── backup_db.sh # Database backup script
│ └── prune_history.sh # Audit history retention cleanup
├── docs/ # Documentation folder
│ └── ARCHITECTURE.md # Deep architectural design specs
├── design-system/ # CSS tokens and design specs
│ └── die-management-system/
│ └── MASTER.md # Global design components and tokens
├── Makefile # Common dev commands (make help)
├── traefik.yml # Traefik static config (entrypoints, providers)
├── dynamic.yml # Traefik dynamic config (TLS store, certificates)
├── docker-compose.yml # Local development compose stack
├── docker-compose.prod.yml # Production compose stack
├── docker-compose.ghcr.yml # Pre-built image compose stack
├── setup.sh # Automated setup (Linux/macOS)
├── setup.ps1 # Automated setup (Windows)
├── deploy.sh # Production upgrade script
└── dms-backup.sh # Database backup and restore script
- Architecture Specs: Detailed layout rules can be found in docs/ARCHITECTURE.md.
- Design Guidelines: Visual UI styling guidelines are located in design-system/die-management-system/MASTER.md.
Run make help to view available CLI tasks:
| Command | Description |
|---|---|
make setup |
Full automated setup (Docker + DB + certs) |
make certs |
Regenerate TLS certificates for current LAN IP |
make uninstall-certs |
Remove all certificates and uninstall Root CA from system trust store |
make start |
Start all containers |
make stop |
Stop all containers |
make logs |
Tail all container logs |
make migrate |
Run database migrations |
make backup |
Run manual database backup |
make build |
Rebuild and restart all containers |
- Start the stack:
docker compose up -d
- Stop without deleting data:
docker compose stop
- Bring down (removes containers and networks):
docker compose down
- View logs:
docker compose logs -f
- Database CLI:
docker compose exec db psql -U dms_user -d dms - Emergency Password Reset:
docker compose exec django python manage.py changepassword root - Emergency Backup Codes / 2FA Reset:
docker compose exec django python manage.py reset_mfa root
Optimized for shop-floor speed with keyboard shortcuts:
- ▲ ArrowUp / ▼ ArrowDown — Navigate up and down through list results.
- Tab / Shift + Tab — Shift focus between input fields.
- Enter — Select and view the highlighted inventory record.
Production deployment uses high-concurrency configuration:
- Nginx: Serves compiled React assets with Gzip compression.
- Gunicorn: WSGI server for Django backend.
- Go Endpoint: Bypasses Django for high-speed reads on
/api/go/*.
Deploy upgrades without downtime using the integrated deployment script:
./deploy.shThis script pulls updates, verifies configuration, builds changed containers, runs migrations, and clears legacy caches.
Automated nightly compressed database dumps at 2:00 AM with 14-day retention. Backups persist to ./backups/.
- Create a manual backup:
./dms-backup.sh backup
- List all local backups:
./dms-backup.sh list
- Restore the database:
./dms-backup.sh restore <backup_filename.dump>
Warning
Restoring a database will overwrite current records and trigger an automatic rebuild of Meilisearch search indexes.
DMS-O2 is built with security-first practices to protect industrial assets and maintain server integrity on local shop floor networks.
- Container Isolation: All processes run under a non-root user (
USER dmsuser). - CSRF Protection: Mutating cookie-based API calls require
X-Requested-With: XMLHttpRequest. - HMAC Signing: Celery outbox task payloads validated via HMAC-SHA256.
- Credential Validation: Startup checks prevent production mode with default credentials.
- HTTPS Enforcement: Traefik auto-enforces TLS and redirects all HTTP traffic.
- Session Integrity: Single active session policy with immediate revocation.
- Timing-Safe Comparisons: Microservice secrets validated using
hmac.compare_digest. - Redis Authentication:
--requirepassenforced across all service connections. - Security Headers: Nginx serves
X-Frame-Options,X-Content-Type-Options,Content-Security-Policy, andPermissions-Policy. - Input Validation: Parameterized SQL queries and strict shell script validation.
- Task Safety: Backup restore tasks pass token hashes instead of raw JWTs.
DMS-O2 secures network connections via HTTPS/TLS. Client devices must trust the server's Root CA to access the dashboard without certificate warnings.
- Server Certificates: Auto-generated for your LAN IP during setup using mkcert. Stored in
certs/(gitignored), valid for 2 years. Regenerate withscripts/generate-certs.shorscripts/generate-certs.bat.
For security issues, see Security Policy for responsible vulnerability reporting guidelines.
To access DMS from another computer on the same LAN without certificate warnings, install the server's root CA certificate (rootCA.cer) on each client device.
graph LR
Server[DMS Server certs/] -->|1. Copy rootCA.cer| Client[Client Computer]
Client -->|2. Install Certificate| TrustStore[OS Trusted Root Store]
TrustStore -->|3. Browse HTTPS| SecureConn[Secure HTTPS Connection]
style Server fill:#e0f2fe,stroke:#0284c7,stroke-width:2px,color:#0369a1;
style Client fill:#f5f3ff,stroke:#7c3aed,stroke-width:2px,color:#6d28d9;
style TrustStore fill:#ecfdf5,stroke:#059669,stroke-width:2px,color:#047857;
style SecureConn fill:#fffbeb,stroke:#d97706,stroke-width:2px,color:#b45309;
Copy certs/rootCA.cer (DER format, optimized for Windows) from the DMS server to the client machine via USB, network share, or email.
Choose the method matching the client machine's environment:
- Copy both
certs/rootCA.cerand the installer scriptscripts/install-cert.batto the same folder on the client machine. - Right-click
install-cert.batand select Run as Administrator.
Install for Current User (No Administrator rights required):
certutil -user -addstore -f "Root" rootCA.cerOr install System-wide (Run PowerShell as Administrator):
certutil -addstore -f "Root" rootCA.cer- Double-click
rootCA.cer. - Click Install Certificate...
- Select Local Machine and click Next.
- Choose Place all certificates in the following store and click Browse.
- Select Trusted Root Certification Authorities and click OK.
- Click Next and click Finish.
Firefox maintains an isolated certificate store:
- Open Firefox and navigate to
about:preferences#privacy. - Scroll to the Certificates section and click View Certificates...
- Select the Authorities tab and click Import...
- Select
rootCA.cerand check Trust this CA to identify websites. - Click OK and restart Firefox.
If Chrome does not inherit the Windows system store automatically:
- Go to
chrome://settings/certificates. - Navigate to Authorities and click Import.
- Select and import the
rootCA.cercertificate.
Navigate to https://<DMS_SERVER_IP> in the client browser. The connection should display a secure padlock with no warnings.
If the server's IP address changes, regenerate certificates:
# Linux/macOS
./scripts/generate-certs.sh
# Windows
scripts\generate-certs.batOr run mkcert directly (replace YOUR_LAN_IP):
mkcert -install
mkcert -cert-file certs/cert.pem -key-file certs/key.pem localhost 127.0.0.1 YOUR_LAN_IP ::1After regeneration, restart Traefik and redistribute the new rootCA.cer:
docker compose up -d --force-recreate traefikThe current priorities and roadmap items for DMS-O2 include:
- CAD Engine Extensions: DWG/DXF dimensional schematic import.
- Expanded Analytics: Historical wear trends and predictive cycle life tracking.
- Multi-Warehouse Syncing: Inter-facility inventory transfers with audit chain validation.
- ScyllaDB Migration: High-throughput timeseries storage for die history logs.
DMS enforces a single active session policy. Signing in from a new device immediately revokes the previous session (returning 401 Unauthorized).
docker compose exec django python manage.py sync_searchNo. Moving dies, adding records, or editing states requires Admin or Root permissions. Unauthenticated users are limited to search and view actions.
Below are solutions to common setup, network, and database issues. Click on a category to expand the troubleshooting steps.
Docker, Container & Port Issues
| Symptom | Primary Cause | Resolution |
|---|---|---|
| Port conflict on 80/443 | Another server (e.g., Apache or host Nginx) is active | Stop the host service: sudo systemctl stop nginx (or apache2), or change port bindings in docker-compose.yml. Both 80 and 443 must be available on the host. |
| Write/Compile permission denied | Root-owned files left in mounting volume | Clean the build artifact directory: run docker compose exec frontend rm -rf dist and restart. |
| Docker "permission denied" on Linux | User is not part of the docker group |
Add your user: sudo usermod -aG docker $USER, then log out and log back in to refresh permissions. |
.env secrets still show auto:run_setup_to_generate |
The .env file already existed before running the setup script |
Remove the incomplete env: rm .env (or del .env on Windows) and run ./setup.sh (or .\setup.ps1) again. |
SSL, HTTPS & LAN Network Issues
| Symptom | Primary Cause | Resolution |
|---|---|---|
| Cannot connect/access from phone or external device | Server IP changed, host is not allowed in Django, or Windows network category is set to Public | DMS auto-detects the server IP during setup. If it fails, add the IP manually to DJANGO_ALLOWED_HOSTS in .env (e.g. DJANGO_ALLOWED_HOSTS=...,192.168.1.15) and restart: docker compose restart django. On Windows, run PowerShell as Administrator and execute Set-NetConnectionProfile -InterfaceAlias Wi-Fi -NetworkCategory Private to allow local routing. |
| Browser shows "Not Secure" or certificate warning | Root CA certificate not installed on client machine | Follow the Client & User Access Installation Guide to install rootCA.cer. For Firefox, import the certificate manually via about:preferences#privacy. |
ERR_CERT_AUTHORITY_INVALID in Chrome |
Chrome is ignoring the OS certificate store | Import the root CA directly via chrome://settings/certificates -> Authorities -> Import. |
| Certificate does not match IP (DNS/IP SAN error) | Server IP address changed after cert generation | Regenerate certificates using ./scripts/generate-certs.sh (Linux/macOS) or scripts\generate-certs.bat (Windows), then reinstall the new root CA on client machines. |
Database, Cache & Search Index Issues
| Symptom | Primary Cause | Resolution |
|---|---|---|
| Meilisearch connection error | Mismatched host mapping | Inside Docker, ensure MEILI_HOST=http://meilisearch:7700. For direct local runs, set MEILI_HOST=http://localhost:7700. |
Migrate fails with MeilisearchCommunicationError |
Migration ran before Meilisearch fully initialized | Ensure meilisearch has a healthcheck in docker-compose.yml and the migrate service has condition: service_healthy in its depends_on. Run docker compose up -d --build to retry. |
password authentication failed for user "dms_user" |
DB volume retains old password, but .env has a new one |
Clean out old volumes: docker compose down -v, then recreate stack: docker compose up -d --build. Note: This wipes database data; re-run migrations and seeds afterwards. |
| Dies missing from sidebar tree / showing 0 count | Database pagination limit exceeded | Increase the pageSize state variable in frontend/src/features/inventory/hooks/useInventoryState.ts and rebuild: docker compose up -d --build frontend. |
Authentication, Sessions & Administration
| Symptom | Primary Cause | Resolution |
|---|---|---|
| 401 Unauthorized loops after login | Go API cannot check tokens because DJANGO_ALLOWED_HOSTS is missing the django service name |
Add django to DJANGO_ALLOWED_HOSTS in .env (e.g. DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,django) and restart: docker compose restart. |
| 401 Unauthorized loops (other) | Database was reset or session became invalid | Clear local storage / cookies in your browser's developer tools and log back in. |
| Locked out / forgot root password | Administrator credentials lost | Reset the password inside the container: docker compose exec django python manage.py changepassword root. |
| Locked out / lost backup recovery codes | User lost all single-use backup codes for secondary sign-in | Clear backup codes and disable 2FA challenge via server CLI: docker compose exec django python manage.py reset_mfa root (or specify any user: ... reset_mfa <username>). |
For corrupted Docker environments or complete resets, wipe all containers, images, networks, volumes, and build cache.
Warning
This command will delete ALL Docker data on your system, not just DMS-O2 resources. Ensure you have backed up any unrelated Docker work.
Linux / macOS:
sudo bash -c 'systemctl start docker && docker ps -aq | xargs -r docker rm -f && docker images -aq | xargs -r docker rmi -f && docker volume ls -q | xargs -r docker volume rm -f && docker network ls --filter type=custom -q | xargs -r docker network rm && docker builder prune -af && docker system prune -af --volumes'Windows (PowerShell as Administrator):
docker rm -f $(docker ps -aq) 2>$null; docker rmi -f $(docker images -aq) 2>$null; docker volume rm -f $(docker volume ls -q) 2>$null; docker network rm $(docker network ls --filter type=custom -q) 2>$null; docker builder prune -af; docker system prune -af --volumesDMS-O2 is a dual-licensed project designed to offer flexibility for both open-source development and proprietary commercial use:
- Open Source (GNU AGPL-3.0): Free to run, copy, modify, and distribute. Network-hosted modifications must be disclosed under AGPL-3.0. See LICENSE.
- Commercial License: For organizations requiring proprietary modifications without disclosure. See LICENSE-COMMERCIAL.md.
Additional details:
- Copyright: COPYRIGHT.md
- Trademarks: TRADEMARK.md
Contributions welcome. See CONTRIBUTING.md for setup, testing, and CLA details.
Included in .githooks/pre-commit to verify Python syntax, check for console.log statements, validate Dockerfiles, and detect secret leaks. Enable with:
git config core.hooksPath .githooksFor deployment support, bug reports, and customization assistance, see Support Guide.
Developed for industrial manufacturing shop floors by Sahil Pradhan.
