GPT-4DevOps

تولیدکننده پیکربندی Docker Compose

اشتراک‌گذاری:

Why this prompt matters

Docker Compose files often miss health checks, resource limits, and proper dependency ordering. This prompt ensures production-readiness from the start.

What we use it for

DevOps

Prompt

Generate a Docker Compose configuration for the described architecture. Include: health checks, restart policies, volume mounts for persistence, environment variable management via .env files, proper networking between services, resource limits, and logging configuration. Add comments explaining each non-obvious configuration choice.

Result

```yaml services: app: build: . restart: unless-stopped ports: ["3000:3000"] depends_on: db: { condition: service_healthy } redis: { condition: service_healthy } environment: DATABASE_URL: postgresql://app:${DB_PASSWORD}@db:5432/myapp deploy: resources: limits: { memory: 512M } healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/health"] interval: 30s timeout: 5s retries: 3 ```

Docker Compose files often miss health checks, resource limits, and proper dependency ordering. This prompt ensures production-readiness from the start.

This prompt demonstrates a structured approach to devops, producing consistent, high-quality results that can be iterated upon.

اشتراک‌گذاری: