Junior — Middle
Have you had experience working with Docker Compose for container orchestration?
sobes.tech AI
Answer from AI
Yes, I have used Docker Compose for orchestrating multiple containers in Node.js projects. It allows running related services (such as an application, database, cache) together using a single configuration file docker-compose.yml.
Here's an example of a simple docker-compose.yml for a Node.js application and MongoDB:
version: '3'
services:
app:
build: .
ports:
- "3000:3000"
depends_on:
- mongo
mongo:
image: mongo:latest
ports:
- "27017:27017"
This simplifies the process of launching and managing a development or testing environment, allowing all services to be quickly brought up and shut down together.