Docker Setup
Get Straktur running with one command
The fastest way to run Straktur. One command gives you everything.
Requirements
You need Docker installed on your machine. Choose one:
| App | Platform | Notes |
|---|---|---|
| OrbStack | macOS | Recommended - fast & lightweight |
| Docker Desktop | macOS, Windows, Linux | Official Docker app |
Quick Start
# Clone the repository (use your purchased repo URL)
git clone <your-repo-url>
cd straktur
# Create your .env from the template (required — Docker won't start without it)
cp .env.example .env
# Start everything
docker compose upDon't skip cp .env.example .env. Without it docker compose up stops immediately with
env file .env not found. You don't need to edit anything inside it for the Docker setup —
the defaults work as-is.
First run takes 2-5 minutes (downloading images, installing dependencies). After that, starts in ~30 seconds.
Once ready, open http://localhost:3000
| Password | |
|---|---|
test@local.dev | testingpassword |
That's it! You now have a fully working app.
What's Running
| Service | URL | What is it? |
|---|---|---|
| App | http://localhost:3000 | Your Straktur application |
| Mailpit | http://localhost:8080 | Local email server - catches all emails sent by the app so you can preview them without sending real emails |
| MinIO | http://localhost:9001 | Local S3-compatible file storage - handles file uploads (avatars, attachments) without needing AWS |
MinIO credentials: minioadmin / minioadmin
Demo Data
To make your start easier, we've prepared demo data that shows you what a real app built with Straktur looks like.
Explore it to see how everything works together - navigation patterns, UI components, data tables, forms, file uploads, and all the features you get out of the box. It's the best way to understand Straktur before building your own features.
What's included:
- 44 companies with logos and details
- 70+ contacts linked to companies
- Activities, relationships, and file attachments
- All dictionary values (statuses, industries, regions)
Starting fresh
Want to start with an empty database instead? Set SEED_DEMO_DATA: "false" in docker-compose.yml and run:
docker compose down -v
docker compose upCommon Commands
Start the app
docker compose upStarts everything and shows logs in your terminal. You'll see what's happening in real-time, but your terminal is busy. Press Ctrl+C to stop.
docker compose up -dStarts in background - your terminal stays free. Use this when you don't need to watch logs.
View logs
docker compose logs -f appShows app logs in real-time. Useful when you started in background or need to debug why something isn't working.
Stop the app
docker compose downStops all containers. Your data (database, files) is preserved - next docker compose up will have everything as you left it.
Full reset
docker compose down -v
docker compose upWarning: The -v flag deletes ALL data - database, uploaded files, everything. Use this only when you want to start completely fresh.
Running on Different Ports
Need to run alongside another instance, or have port conflicts? All ports are configurable via environment variables.
Add them to the .env you created in Quick Start:
# .env
APP_PORT=3001
DB_PORT=5434
MINIO_PORT=9002
MINIO_CONSOLE_PORT=9003
MAILPIT_SMTP_PORT=1026
MAILPIT_UI_PORT=8081Then start normally:
docker compose upYou only need to set the ports that conflict — all have sensible defaults. To try a port
without editing anything, prefix the command instead: APP_PORT=3001 docker compose up.
| Variable | Default | Service |
|---|---|---|
APP_PORT | 3000 | App |
DB_PORT | 5433 | PostgreSQL |
MINIO_PORT | 9000 | MinIO S3 API |
MINIO_CONSOLE_PORT | 9001 | MinIO Console |
MAILPIT_SMTP_PORT | 1025 | Mailpit SMTP |
MAILPIT_UI_PORT | 8080 | Mailpit Web UI |
NEXT_PUBLIC_APP_URL and S3_PUBLIC_ENDPOINT are automatically derived from these port variables — no need to set them separately for Docker.
What .env does and doesn't control
Some variables are set directly in docker-compose.yml and take precedence over your
.env — editing them there has no effect on the Docker setup:
| Variable | Value in Docker | Why it ignores .env |
|---|---|---|
DATABASE_URL | postgresql://…@db:5432/straktur | Your .env points at localhost:5433 for host-side tooling; that port doesn't exist inside the container |
S3_ENDPOINT | http://minio:9000 | The app reaches MinIO over Docker's internal network |
SMTP_HOST / SMTP_PORT | mailpit / 1025 | Same — Mailpit's in-container address |
This is deliberate: those values must describe the container network, not your host.
The dev convenience values are fixed in docker-compose.yml too — BETTER_AUTH_SECRET,
SEED_USER_*, SEED_ORG_*, SEED_DEMO_DATA, ALLOW_DB_SEED / ALLOW_DB_RESET. To change
the seeded user or organization, edit them there rather than in .env.
Everything else works normally from .env: the port variables above, APP_MODE,
NEXT_PUBLIC_EXAMPLES_MODE, the OAuth credentials, and the optional SMTP / Resend /
Supabase settings.
Development vs Production
By default, Docker runs in development mode with hot reload and devtools.
Development (default)
docker compose up- Hot reload enabled
- TanStack Query and Next.js devtools visible
- Faster startup (no build step)
Production mode
APP_MODE=production docker compose upOr set in .env:
APP_MODE=productionProduction mode:
- Builds the app first (
npm run build) - Runs optimized
next startinstead ofnext dev - No devtools icons
- Better performance, closer to real deployment
Use production mode to test performance or verify your build works before deploying.
Troubleshooting
env file .env not found
Compose exits immediately, before starting any container. The .env file is missing:
cp .env.example .envCan't log in
Make sure you're using the correct credentials:
- Email:
test@local.dev - Password:
testingpassword
If it still doesn't work, the seed might have failed. Check logs and try resetting:
docker compose down -v
docker compose upApp shows errors or blank page
Check what's happening in the logs:
docker compose logs -f appLook for error messages - they usually tell you what's wrong.
Code changes not visible
If your changes aren't showing up, restart the app container:
docker compose restart appDatabase not responding
Check if PostgreSQL is running:
docker compose ps
docker compose logs dbWait for "database system is ready to accept connections" message. If it's not starting, try a full reset:
docker compose down -v
docker compose upNext Steps
- Project Structure - Understand the codebase
- Add Your First Feature - Build something