Docker configuration

Run each Zato environment as one container, configured entirely from the outside.

One Zato container is one complete environment - the server, the Dashboard, the scheduler and the load balancer all start together. Everything about the container is configured from the outside, through environment variables and mounted directories, so nothing that defines the environment is stored inside it. A replacement container rebuilds the same environment from those inputs - the variables, the mounted project and the databases that run outside the container.

Start from the blueprint

The blueprint repository is a ready-made project structure - Python services, an enmasse YAML file with the configuration, Python requirements and user config files, laid out in the directory structure that a container reads at startup. Its provisioning script, myproject/impl/scripts/run-container.sh, starts and configures a container around the project, and it is meant to be the basis of your own provisioning scripts.

The deployment tutorial works through the whole blueprint - what each directory is for, what the script does step by step and how a starting container finds the project.

Deploy your projects

A container deploys the project that you mount into it. The Zato_Project_Root variable points at the mounted directory, and the server loads the services, the enmasse YAML and the config files from there. After the start, the server keeps watching the mounted files, so a service that you edit on the host is redeployed each time you save it - see hot deployment.

Configure the container

Every setting - ports, passwords, databases, logging, TLS - is an environment variable that you pass to docker run. For example, three variables set the Dashboard password, move the Dashboard to another port and turn on DEBUG logging:

docker run \
  -e Zato_Dashboard_Password=my.secret.password \
  -e Zato_Port_Dashboard=9000 \
  -e Zato_Log_Level=DEBUG \
  ...

For the full list, grouped by subject, see the environment variables reference.

See also

PageWhat it covers
Installation with DockerThe first docker run that creates a complete environment
Deployment tutorialThe blueprint project and the provisioning script that starts a container
Starting and stoppingThe container lifecycle and what a restart preserves
Updating environmentsMoving a running environment to a newer image
KubernetesThe same container under Kubernetes, with configuration from Git

Learn more