Pan docker

From eltmon/overdeck · View interactive version

Pan docker is an AI agent skill from the GitHub repository eltmon/overdeck. Docker template selection and configuration for workspaces

How to use this skill

Skill file

Docker Template Configuration

Overview

This skill guides you through selecting and configuring Docker templates for Overdeck workspaces. Templates provide containerized development environments with hot reload, databases, and Traefik integration.

When to Use

Available Templates

| Template | Stack | Services |

|----------|-------|----------|

| spring-boot | Java 21 + Maven | PostgreSQL, Redis |

| react-vite | React + Vite | - |

| nextjs | Next.js 14+ | - |

| dotnet | .NET 8 | SQL Server |

| python-fastapi | Python 3.12 + FastAPI | PostgreSQL, Redis |

| monorepo | Frontend + Backend | PostgreSQL, Redis |

Template Selection Guide

By Language/Framework

| Your Stack | Recommended Template |

|------------|---------------------|

| Java/Spring | spring-boot |

| React (CRA, Vite) | react-vite |

| Next.js | nextjs |

| .NET Core/ASP.NET | dotnet |

| Python/FastAPI | python-fastapi |

| Full-stack | monorepo |

By Database Needs

| Need | Templates |

|------|-----------|

| PostgreSQL | spring-boot, python-fastapi, monorepo |

| SQL Server | dotnet |

| Redis | spring-boot, python-fastapi, monorepo |

| No database | react-vite, nextjs |

Workflow: Add Docker to Project

1. Copy Template Files

# Choose your template
TEMPLATE=react-vite  # or: spring-boot, nextjs, dotnet, python-fastapi, monorepo

# Copy to project
cp ~/Projects/overdeck/templates/docker/$TEMPLATE/* /path/to/your/project/

2. Create Environment File

cd /path/to/your/project

cat > .env << 'EOF'
# Application
APP_PORT=3000
HOSTNAME=myapp.overdeck.localhost
COMPOSE_PROJECT_NAME=myapp

# Database (if applicable)
DB_NAME=myappdb
DB_USER=postgres
DB_PASSWORD=secretpassword
EOF

3. Start Containers

docker compose up -d

4. Verify

docker compose ps
docker compose logs -f app

Template Details

spring-boot

Files:

Ports:

Hot reload: spring-boot-devtools

react-vite

Files:

Ports:

Hot reload: Vite HMR with polling

nextjs

Files:

Ports:

Hot reload: Fast Refresh with WATCHPACK_POLLING

dotnet

Files:

Ports:

Hot reload: dotnet watch

python-fastapi

Files:

Ports:

Hot reload: Uvicorn --reload

monorepo

Files:

Ports:

Customization

Add a Service

Edit docker-compose.yml:

services:
  # ... existing services ...

  elasticsearch:
    image: elasticsearch:8.11.0
    environment:
      - discovery.type=single-node
    ports:
      - "9200:9200"
    networks:
      - app-network

In a stack that declares named networks (as every bundled template does with

app-network), every service must list at least one named network or set

network_mode: (use network_mode: none for a one-shot job such as a chown

or a migration that needs no network). A service with neither, or with an

empty networks:, puts Compose on an extra <project>_default network,

which uses another bridge subnet. A stack that declares no networks at all and

relies only on _default is fine; that network is its only one.

Change Ports

Edit .env:

APP_PORT=8080
DB_PORT=5433

Add Environment Variables

Edit docker-compose.yml under the service:

environment:
  - MY_VAR=value
  - ANOTHER_VAR=${FROM_ENV_FILE}

Traefik Integration

All templates include Traefik labels for local HTTPS:

labels:
  - "traefik.enable=true"
  - "traefik.http.routers.myapp.rule=Host(`myapp.overdeck.localhost`)"

Enable Traefik

  1. Start Traefik (if not running):

```bash

cd /path/to/overdeck/templates/traefik

docker compose up -d

```

  1. Connect your app to Traefik network:

```yaml

networks:

traefik:

external: true

name: traefik_default

```

  1. Access via: https://myapp.overdeck.localhost

Troubleshooting

Container won't start:

docker compose logs app
# Check for errors, missing dependencies

Hot reload not working:

Port conflicts:

# Find what's using the port
lsof -i :3000
# Change port in .env

Database connection failed:

# Wait for healthcheck
docker compose ps
# Check credentials match

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.