Skip to main content

Docker & HTTPS Setup

Configure Docker, Traefik, and local HTTPS for Overdeck workspaces.

Overview

Overdeck uses Docker for isolated development environments and Traefik as a reverse proxy for local HTTPS. This enables:
  • Isolated workspaces - Each feature branch runs in its own containers
  • Local HTTPS - Trusted certificates for .localhost or custom domains
  • Automatic routing - Traefik routes traffic based on container labels

Prerequisites

  • Docker Desktop (macOS/Windows) or Docker Engine (Linux)
  • Docker Compose v2.x
  • mkcert for local certificate generation

Quick Setup

Traefik Configuration

Overdeck manages Traefik configuration in ~/.overdeck/traefik/:

Static Configuration

The main Traefik config (~/.overdeck/traefik/traefik.yml):

Dynamic Configuration

Each workspace gets a dynamic config file. Example for feature-min-123:

Certificate Generation

Using mkcert

For Custom Domains

If using custom domains like myapp.test:

DNS Configuration

Modern browsers resolve *.localhost to 127.0.0.1 automatically. No DNS config needed.

Option 2: /etc/hosts

For custom domains, add entries to /etc/hosts:

Option 3: WSL2 Hosts Sync (Windows)

For WSL2, use the wsl2hosts sync method:
This syncs entries between WSL2’s /etc/hosts and Windows’ hosts file.

Starting Traefik

Via Dashboard

The dashboard starts Traefik automatically when you run pan up:

Manually

Workspace Container Setup

Docker Compose Template

Network Setup

Create the shared Overdeck network:
All workspaces and Traefik connect to this network for routing.

Troubleshooting

”Connection refused” on HTTPS

  1. Check Traefik is running:
  2. Check Traefik logs:
  3. Verify certificates exist:

“Certificate not trusted” warnings

  1. Install mkcert’s CA:
  2. Restart your browser

Workspace containers not routable

  1. Verify containers are on the overdeck network:
  2. Check container labels:
  3. Check Traefik dashboard at http://localhost:8080

Port conflicts

If ports 80/443 are in use:

WSL2-specific issues

See Troubleshooting for WSL2-specific networking and performance issues.

Best Practices

Resource Management

  • Limit concurrent workspaces - Each workspace uses memory
  • Use shared volumes - Cache npm/maven dependencies across workspaces
  • Clean up old containers - Run docker system prune periodically

Security

  • Don’t expose Traefik externally - Keep it bound to localhost
  • Use unique certificates per environment - Don’t share between machines
  • Regenerate certificates periodically - mkcert certs expire after ~1 year

Performance

  • Use Docker volumes for node_modules - Avoid mounting from host
  • Adjust Vite polling interval - See Troubleshooting
  • Monitor container resources - Use docker stats