Windsurf prompt

Docker Compose Stack

Multi-container Docker Compose setup with networking, volumes, health checks, and production-ready configuration.

Create a Docker Compose stack for {{project_name}}.

## Services to run: {{services}}
## Environment: {{environment}}

### docker-compose.yml Structure
Version 3.9+ syntax.
Named volumes for data persistence.
Custom network for service isolation.
Health checks for all stateful services.

### Service Definitions

**Application Service ({{app_name}})**
Build from local Dockerfile or pull from registry.
Depends on: {{dependencies}}.
Environment variables from .env file.
Ports: {{app_port}}:3000.
Volume mounts for hot-reload in development.
Restart policy: unless-stopped.
Health check: curl health endpoint.

**Database: {{database}}**
Official image with pinned version.
Named volume for data: {{db_volume}}:/var/lib/postgresql/data.
POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD from secrets.
Health check: pg_isready.
Exposed on internal network only (not published to host in production).

**Cache: Redis (if applicable)**
redis:7-alpine image.
Named volume for persistence.
maxmemory policy: allkeys-lru.

**Reverse Proxy: Nginx (production)**
nginx:alpine.
Config mounted as volume.
SSL termination with certbot/Let's Encrypt.
Published ports: 80 and 443.

### Development vs Production
docker-compose.yml: base config.
docker-compose.override.yml: dev overrides (volumes, hot-reload).
docker-compose.prod.yml: production overrides (resource limits, no bind mounts).

### Dockerfile (multi-stage)
Stage 1: deps install.
Stage 2: build.
Stage 3: production runner (minimal image).

### Makefile
make dev, make prod, make logs, make shell, make db-shell.

Fill in: {{project_name}}, {{services}}, {{environment}}, {{app_name}}, {{dependencies}}, {{app_port}}, {{database}}, {{db_volume}}. In Loopy you fill these in a form and copy the finished prompt in one click.