Imported from eltmon/overdeck (
sync-sources/skills/pan-docker/SKILL.md). Install upstream withnpx skills add eltmon/overdeck --skill pan-docker. Copyright stays with the author.
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
- Setting up Docker for a new project
- Choosing the right template for your stack
- Configuring container settings
- Integrating with Traefik for local HTTPS
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:
Dockerfile.dev- Java 21 + Mavendocker-compose.yml- App + PostgreSQL + Redis
Ports:
- 8080: Application
- 5005: Debug
- 5432: PostgreSQL
- 6379: Redis
Hot reload: spring-boot-devtools
react-vite
Files:
Dockerfile.dev- Node.js 20docker-compose.yml- App only
Ports:
- 5173: Vite dev server
Hot reload: Vite HMR with polling
nextjs
Files:
Dockerfile.dev- Node.js 20docker-compose.yml- App only
Ports:
- 3000: Next.js dev server
Hot reload: Fast Refresh with WATCHPACK_POLLING
dotnet
Files:
Dockerfile.dev- .NET 8 SDKdocker-compose.yml- App + SQL Server
Ports:
- 5000: Application
- 1433: SQL Server
Hot reload: dotnet watch
python-fastapi
Files:
Dockerfile.dev- Python 3.12docker-compose.yml- App + PostgreSQL + Redis
Ports:
- 8000: FastAPI
- 5432: PostgreSQL
- 6379: Redis
Hot reload: Uvicorn --reload
monorepo
Files:
Dockerfile.frontend- React/ViteDockerfile.backend- Node.jsdocker-compose.yml- Both + PostgreSQL + Redis
Ports:
- 5173: Frontend
- 3001: Backend API
- 5432: PostgreSQL
- 6379: Redis
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
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
-
Start Traefik (if not running):
cd /path/to/overdeck/templates/traefik docker compose up -d -
Connect your app to Traefik network:
networks: traefik: external: true name: traefik_default -
Access via: https://myapp.overdeck.localhost
Troubleshooting
Container won't start:
docker compose logs app
# Check for errors, missing dependencies
Hot reload not working:
- Verify polling is enabled (check Dockerfile/compose)
- Check volume mounts are correct
- Restart:
docker compose restart app
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
/pan:network- Traefik and networking setup/pan:projects- Project management/pan:config- Configuration