💻 Codingintermediate5 variables

Create Docker Compose Configuration

Generate Docker Compose files for your stack.

dockerdevopsinfrastructure

Template

Create a Docker Compose configuration for: Services needed: {{services}} Requirements: - Environment: {{environment}} - Networking: {{networking_requirements}} - Volumes: {{volume_requirements}} - {{additional_requirements}} Please include: 1. docker-compose.yml with all services 2. Environment variables setup 3. Health checks 4. Recommended .env file structure

Variables to Fill In

1
{{services}}

Required services

Example: Node.js app, PostgreSQL, Redis

2
{{environment}}

Environment type

Example: Development

3
{{networking_requirements}}

Network setup

Example: Internal network, expose only app port

4
{{volume_requirements}}

Data persistence

Example: Persist database data

5
{{additional_requirements}}

Other requirements

Example: Hot reloading for development

Example Usage

Variables Used:

services = Python Flask, MongoDB, Nginx
environment = Production
networking_requirements = Nginx as reverse proxy
volume_requirements = Persist MongoDB data
additional_requirements = SSL termination

Result:

Create production Docker Compose for Flask, MongoDB, and Nginx with SSL termination and data persistence.

Tips for Best Results

  • 1Be specific with your variables - the more detail you provide, the better the AI response.
  • 2Start with the example values if you're unsure, then customize based on your needs.
  • 3Iterate on the results - if the first response isn't perfect, refine your variables and try again.
  • 4Combine multiple templates for complex tasks that require different perspectives.