Prerequisites
- You will be given access to the 2501 image registries.
- A Docker Swarm cluster initialized with
docker swarm init
on the manager node. - Worker nodes joined to the cluster using
docker swarm join
(if using multiple nodes). - For production, it’s recommended to pre-pull the images on every Swarm node for faster deployments and to avoid network issues during rollout.
Deploying for testing
For quick testing, you can usedocker run
with the given images and environment variables.
The 2501 services will be run as standalone containers, and will NOT benefit from the Swarm orchestration and scaling.
Deploying for production
We will provide a Docker Compose file that will deploy the 2501 services. It’s recommended to pre-pull the Engine and Accounts images on every Swarm node for faster deployments. You can then use thedocker stack deploy
command to deploy the services to the Swarm cluster.
The 2501 services will be run as Swarm-managed services, and will benefit from the Swarm orchestration, scaling, and high availability features.
Docker Compose + Swarm Caveats
- Compose file version: Must use version 3.x or higher.
- Ignored directives:
build
,depends_on
,container_name
,links
, andrestart
are ignored. Images must be pre-built, and usedeploy.restart_policy
instead ofrestart
. - Host volumes: Paths must exist on all nodes. Consider using named volumes with drivers for multi-node setups.
- Swarm config: Use the
deploy:
section for replicas, constraints, and resource limits (ignored bydocker-compose up
).
Troubleshooting
If you encounter issues, you can use thedocker service logs
command to view the logs of the services.
You can also use the docker stack ps
command to view the tasks of the services.