Quick Start
1
Build the image
- Stage 1 (deps): Installs dependencies and compiles native modules
- Stage 2 (build): Builds Next.js production bundle
- Stage 3 (runtime): Minimal runtime image with only production artifacts
2
Run the container
The container runs as non-root user
nextjs (UID 1001) for security.3
Access the dashboard
Open http://localhost:3000 and login with your configured credentials.
Docker Compose
For persistent deployments, use Docker Compose:Dockerfile Architecture
The production Dockerfile (39 lines) implements security and efficiency best practices:Stage 1: Dependencies
- Uses
node:20-slimfor minimal base image - Installs build tools (
python3,make,g++) forbetter-sqlite3native compilation - Handles missing lockfile gracefully with warning
- Cleans up apt cache to reduce layer size
Stage 2: Build
next.config.js).
Stage 3: Runtime
- Runs as non-root user
nextjs(UID 1001) - Only includes runtime artifacts (no source code, build tools, or dev dependencies)
- Pre-creates
.datadirectory with correct ownership - Includes health check for orchestration platforms
- Installs only
curlfor health checks
Persistent Data
Mission Control stores all state in SQLite under/app/.data/ inside the container:
mission-control.db- Main databasemission-control-tokens.json- Token storage- Logs and temporary files
Volume Backup
Back up the SQLite database:Volume Restore
Configuration
Pass environment variables via:-
Command line:
-
Env file:
-
Docker Compose:
Port Configuration
The container exposes port3000 by default. Override with the PORT environment variable:
The
HOSTNAME is set to 0.0.0.0 in the Dockerfile to accept connections from all interfaces inside the container.Health Checks
The image includes a built-in health check that queries/login every 30 seconds:
Production Checklist
1
Set secure credentials
2
Configure host access control
3
Enable secure cookies
4
Mount persistent volume
5
Configure restart policy
6
Set up backups
Schedule regular backups of the
/app/.data volume.Troubleshooting
”pnpm-lock.yaml not found” warning
The Dockerfile gracefully handles missing lockfiles by falling back topnpm install --no-frozen-lockfile.
For reproducible builds, include pnpm-lock.yaml in your build context.
Permission denied on .data directory
The container runs as usernextjs (UID 1001). If mounting a host directory: