ScanStock is a warehouse inventory and barcode scanning platform designed for manufacturing plants, warehouses, and industrial operations.
This repository provides the official deployment configuration for running ScanStock using Docker containers.
It includes:
- Deployment documentation
- Environment configuration template
- Docker Compose configuration
- Runtime configuration reference
Important This repository does not include the proprietary ScanStock application source code. It provides the deployment configuration required to run the ScanStock container.
ScanStock runs as a Docker container.
Administrators configure the system using:
1️⃣ Environment variables (.env)
2️⃣ Docker Compose configuration
3️⃣ Persistent storage volumes
The container includes everything required to run the application.
docker pull ghcr.io/jcp-vision/scanstock:latestCopy the environment template:
cp .env.example .envEdit .env and configure the required variables.
Minimum required configuration:
LICENSE_KEY=
DJANGO_SUPERUSER_USERNAME=
DJANGO_SUPERUSER_PASSWORD=
DJANGO_SUPERUSER_EMAIL=These values are used during the first container startup to automatically create the administrator account.
Example:
LICENSE_KEY=XXXX-XXXX-XXXX
DJANGO_SUPERUSER_USERNAME=admin
DJANGO_SUPERUSER_PASSWORD=StrongPassword123
DJANGO_SUPERUSER_EMAIL=admin@company.comCreate a file called:
docker-compose.yml
Example configuration:
services:
scanstock:
image: ghcr.io/jcp-vision/scanstock:latest
container_name: scanstock
restart: unless-stopped
ports:
- "8000:8000" # Change the first 8000 to any port you want to use on your host machine
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
volumes:
- scanstock_data:/var/lib/jcp-vision
volumes:
scanstock_data:ScanStock runs inside the container on port 8000.
You may map this to any port on your server.
Example:
ports:
- "8080:8000"This means:
Host Port → 8080
Container Port → 8000
Access the application at:
http://server-ip:8080
Run:
docker compose up -dDocker will:
- Start the ScanStock container
- Initialize the application
- Create the administrator account
- Prepare database and static assets
On the first startup, the ScanStock container automatically performs:
1️⃣ Database migrations 2️⃣ Administrator account creation 3️⃣ Static asset collection 4️⃣ Runtime storage initialization
No manual setup steps are required.
These tasks are handled automatically by the container entrypoint.
Open the application in your browser.
Example:
http://server-ip:HOST_PORT
Example if using port mapping 8080:8000:
http://localhost:8080
Login using the administrator credentials defined in .env.
ScanStock can be configured using environment variables inside .env.
Configuration priority:
Environment Variables (.env)
↓
pyproject.toml defaults
↓
Application fallback defaults
This allows administrators to override application behavior without modifying the container image.
These variables are required for initial setup.
| Variable | Description |
|---|---|
| LICENSE_KEY | ScanStock license key |
| DJANGO_SUPERUSER_USERNAME | Administrator username |
| DJANGO_SUPERUSER_PASSWORD | Administrator password |
| DJANGO_SUPERUSER_EMAIL | Administrator email |
| Variable | Description | Default |
|---|---|---|
| DEBUG | Enable Django debug mode | False |
| ALLOWED_HOSTS | Allowed domains | * |
| SECRET_KEY | Override Django secret key | auto-generated |
Example:
DEBUG=False
ALLOWED_HOSTS=localhost,inventory.company.com
SECRET_KEY=your-secret-keyFor production deployments DEBUG must remain disabled.
Optional security settings:
| Variable | Description |
|---|---|
| SESSION_COOKIE_SECURE | Require HTTPS for session cookies |
| CSRF_COOKIE_SECURE | Require HTTPS for CSRF cookies |
Example:
SESSION_COOKIE_SECURE=True
CSRF_COOKIE_SECURE=TrueThese should be enabled when deploying behind HTTPS or a reverse proxy.
These control system behavior and scanning features.
| Variable | Description | Default |
|---|---|---|
| WEB_LABEL_PRINTER | Enable web label printing | True |
| TRANSACTION_APPROVAL_NEEDED | Require approval for transactions | True |
| LOGIN_AUTH_NEEDED | Require authentication barcode login | True |
| ALLOW_ORDER_ENTRY | Allow manual order entry | True |
| LOGIN_BARCODE_OVERRIDE | Allow barcode login override | False |
| ALLOW_ORDER_SCAN | Allow scanning for order details | True |
| ENFORCE_JS_REGEX | Enforce Javascript regex validation | True |
Example:
WEB_LABEL_PRINTER=True
TRANSACTION_APPROVAL_NEEDED=True
LOGIN_AUTH_NEEDED=True
ALLOW_ORDER_ENTRY=True
LOGIN_BARCODE_OVERRIDE=FalseThese settings define barcode formats recognized by the system.
| Variable | Description |
|---|---|
| ITEM_SCAN_REGEX | Regex pattern for item barcodes |
| QTY_SCAN_REGEX | Regex pattern for quantity scans |
| AUTH_SCAN_REGEX | Regex pattern for authentication barcodes |
| ORDER_SCAN_REGEX | Regex pattern for order barcodes |
Example:
ITEM_SCAN_REGEX=/^SS-\d{6}-JCV$/
QTY_SCAN_REGEX=/^QTY:[A-Za-z0-9]+\|UNIT:[A-Za-z0-9]+$/
AUTH_SCAN_REGEX=/^(USR|USER):[^|]+\|(PWD|PASSWORD):[^|]+\|AUTH:JCV$/
ORDER_SCAN_REGEX=/^MOS-\d+$/These settings control licensing validation.
| Variable | Description | Default |
|---|---|---|
| CHECK_PERIODIC | Enable periodic system checks | True |
| LICENSE_CHECK_INTERVAL_SECONDS | License validation interval | 300 |
Example:
CHECK_PERIODIC=True
LICENSE_CHECK_INTERVAL_SECONDS=300Configure the internal label printing service.
| Variable | Description | Default |
|---|---|---|
| PRINTER_LOCAL_PORT | Port used by the local printer service | 54321 |
Example:
PRINTER_LOCAL_PORT=54321By default ScanStock uses SQLite stored in the persistent Docker volume.
Enterprise deployments may connect to an external database.
Enable external database support:
CUSTOM_ENGINE=trueThen configure the database connection.
| Variable | Description |
|---|---|
| DB_ENGINE | Django database backend |
| DB_NAME | Database name |
| DB_USER | Database username |
| DB_PASSWORD | Database password |
| DB_HOST | Database host |
| DB_PORT | Database port |
Example MySQL configuration:
CUSTOM_ENGINE=true
DB_ENGINE=django.db.backends.mysql
DB_NAME=scanstock
DB_USER=root
DB_PASSWORD=password
DB_HOST=mysql
DB_PORT=3306Example PostgreSQL configuration:
CUSTOM_ENGINE=true
DB_ENGINE=django.db.backends.postgresql
DB_NAME=scanstock
DB_USER=postgres
DB_PASSWORD=password
DB_HOST=postgres
DB_PORT=5432ScanStock stores runtime data inside:
/var/lib/jcp-vision
This directory contains:
- SQLite database (if used)
- license data
- uploaded media
- runtime system data
The directory must be mounted as a Docker volume.
Example:
volumes:
- scanstock_data:/var/lib/jcp-visionThis ensures data persists between container updates.
View container logs:
docker compose logs -f scanstockTo update the container:
docker compose pull
docker compose up -dBecause runtime data is stored in the Docker volume, your data will remain intact.
After modifying .env, restart the container:
docker compose down
docker compose up -dScanStock requires a valid license key.
For licensing inquiries:
licensing@jcp-vision.com
© 2026 JCP-VISION LIMITED