Preparation

Here's how to create a Docker network and deploy a set of Docker compose files. We use the concept of metastack to deploy multiple stacks and have some labels and naming conventions to group them together:

$ docker network create \  --driver=weaveworks/net-plugin:2.1.3 \  --subnet=10.32.2.0/24 \  --attachable \  parse_net$ docker volume create mongo_data$ docker stack deploy -c mongodb.yml         parse_01$ docker stack deploy -c parse.yml           parse_02$ docker stack deploy -c parse_dashboard.yml parse_03$ docker stack deploy -c ingress.yml         parse_04

While deploying things on production, we do not set up the network and volumes with any Docker compose files. All stacks should refer to external volumes and networks.

Starting with MongoDB, we have ...

Get Docker for Serverless Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.