Docker Compose Preferences

Docker Compose Preferences

Lays down a developer's preferences for Docker Compose setups: one-command local stacks, pinned images, healthchecks, secrets in env files, volumes and profiles.

Docker Compose taste of a developer who wants one-command local environments

  • Make docker compose up the only command a new teammate needs to start the full local stack. Confidence: 0.90
  • Name the file compose.yaml and drop the obsolete top-level version: key. Confidence: 0.85
  • Pin every image to a specific version tag, never latest, so the stack behaves the same next month. Confidence: 0.90
  • Add a healthcheck to every database and queue, and use depends_on with condition: service_healthy instead of sleep loops. Confidence: 0.90
  • Keep secrets and machine-specific values in a gitignored .env file, and commit a .env.example with safe defaults. Confidence: 0.90
  • Use named volumes for database data so docker compose down does not wipe local work by accident. Confidence: 0.85
  • Bind ports to 127.0.0.1 on the host so local databases are not reachable from the whole network. Confidence: 0.80
  • Mount source code only for services you edit live, and use develop.watch or a bind mount with clear sync rules. Confidence: 0.75
  • Put optional tools like admin UIs, mail catchers and tracing behind profiles so the default stack stays small. Confidence: 0.80
  • Use compose.override.yaml for personal tweaks and keep it out of git. Confidence: 0.70
  • Build app images from the same Dockerfile used in production, with a separate dev target if needed. Confidence: 0.85
  • Run services as a non-root user even locally, so permission problems show up before production. Confidence: 0.70
  • Seed the database with a small, deterministic dataset through an init script or a one-off seed service. Confidence: 0.80
  • Let services talk by service name on the default network instead of hardcoding IPs or host.docker.internal. Confidence: 0.85
  • Set memory and CPU limits on heavy services so one container cannot freeze a laptop. Confidence: 0.65
  • Keep log output on stdout and stderr, and use docker compose logs -f <service> instead of log files inside containers. Confidence: 0.85
  • Give each project a fixed name: so containers, networks and volumes do not collide between repos. Confidence: 0.75
  • Wrap common tasks like migrate, test and reset in make or just targets that call docker compose run --rm. Confidence: 0.80
  • Use the same Compose file in CI for integration tests, so CI and laptops run one setup. Confidence: 0.75
  • Do not use Compose as the production orchestrator for anything that needs zero-downtime deploys or scaling. Confidence: 0.80

Public domain (CC0 1.0) · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 6,373 prompts

More by @OpenSourceBuffGuy

See all
Website Clone Architect prompt image

Website Clone Architect

Reverse-engineers a website section by section, writes component specs, and hands them to parallel builder agents in git worktrees to rebuild it.

agent-skill, orchestrator, parallel-agents, multi-agent, plan-then-execute, web-development, frontend, codebase-analysis, scaffolding, css, html, nextjs, typescript, git, mcp, claude-code, for-developers, for-designers, long-form, advanced, technical-spec, task-decomposition, structured-output, design-systems, ui-ux, tool-use, checklist, report, vibe-coding

Italian Terrace Cafe Candid Portrait prompt image

Italian Terrace Cafe Candid Portrait

Generates a photorealistic candid shot of a woman in a white corset dress laughing at a sunny hotel terrace cafe, written as detailed JSON.

image-prompt, json-prompt, structured-output, photorealistic, portrait, woman, candid, fashion, cottagecore, natural-light, golden-hour, bokeh, summer, travel, cityscape, mountains, medium-shot, vibrant-colors, for-photographers, nano-banana, fashion-shoot, luxury

Night Street Photo With Leashed Cat prompt image

Night Street Photo With Leashed Cat

Generates a flash-lit night street photo of a blonde woman in a retro track jacket walking a hissing tabby cat on a leash.

image-prompt, json-prompt, nano-banana, structured-output, portrait, woman, animals, pet-portrait, night-scene, street-photography, candid, editorial, fashion, dramatic-lighting, photorealistic, vertical-format, medium-shot, graffiti, for-photographers, for-content-creators

1 view

Reviews

Loading reviews…

Discussion

Loading comments…