Docker Compose is a tool for defining and running multi-container Docker applications using YAML files to configure application services.
What is Docker Compose?
Docker Compose allows defining a complete application with multiple containers in a single file, facilitating the development and deployment of complex applications.
# Start servicesdocker-compose up
# Start in backgrounddocker-compose up -d
# Stop servicesdocker-compose down
# View logsdocker-compose logs
# Execute command in servicedocker-compose exec web bash
Development
1
2
3
4
5
6
7
8
# Rebuild servicesdocker-compose build
# Scale servicesdocker-compose up --scale web=3# Environment variablesdocker-compose --env-file .env up