Using Docker Compose for deployment
However, you need to install the Docker Compose utility in your operating system, which requires Docker Engine as the pre-installation requirement. After the installation, the next step is to create the docker-decompose.yaml
file containing all the services needed to build the images, process the Dockerfile, build the Docker network, and create and run the containers. The following snippet shows the content of our configuration file that sets up the mongo
and ch11-app
containers:
version: “3” services: ch11-mongo: image: “mongo” ports: - 27017:27017 expose: - 27017 ...