DevOps & Deployment January 13, 2025 1 min read

Docker Compose for Development

Set up development environments with Docker Compose.

S
Emma Wilson
Cybersecurity analyst and penetration tester
13 views

Table of Contents

  • Loading table of contents...

Docker Compose Development

Create reproducible development environments.

Example Configuration

# docker-compose.yml
version: '3.8'
services:
  web:
    build: .
    volumes:
      - .:/app
    ports:
      - "8000:8000"
    depends_on:
      - db
      - redis
  
  db:
    image: postgres:14
    environment:
      POSTGRES_DB: mydb
      POSTGRES_PASSWORD: secret
    volumes:
      - pgdata:/var/lib/postgresql/data
  
  redis:
    image: redis:alpine

volumes:
  pgdata:

Related Articles

Discussion 0

No comments yet. Be the first to start the discussion!

Leave a Comment