Junior — Middle
Do you have experience using Docker Compose for setting up and managing multi-container applications?
sobes.tech AI
Answer from AI
Yes, Docker Compose is used for convenient definition and running of multi-container applications. In the docker-compose.yml file, services, networks, and volumes are described, allowing all components to be started with the command docker-compose up.
An example of a simple docker-compose.yml for a Python application with a database:
version: '3'
services:
web:
build: .
ports:
- "5000:5000"
depends_on:
- db
db:
image: postgres:13
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
This approach simplifies dependency management between services and their configuration.