Managing docker-compose.yml files
Overview
Options and settings for a variety of features are available in various docker-compose.yml files stored on disk for each specific component.
These files can be customized, however, CAST highly recommends that you create “override” files in all situations so that changes are not lost when you update your CAST Imaging installation to a new release. This documentation explains how to do this.
What is a docker-compose.yml file?
A docker-compose.yml file is a configuration file used by Docker Compose to define and run multi-container Docker applications, such as CAST Imaging. It uses the YAML syntax to specify services, networks, and volumes for the CAST Imaging application stack.
How can I customize a CAST Imaging docker-compose.yml file?
A docker-compose.yml is present for each component installed as part of a CAST Imaging application stack and contains required configuration settings. Customization can be applied either before a “from scratch” installation, or post-installation. To do so, create an empty docker-compose.override.yml file in the following folders (depending on your use-case) and then copy and paste the relevant option from the docker-compose.yml file and apply the customization:
Pre-install
In the unzipped installation media:
cast-imaging-services/
cast-imaging-node/
cast-imaging-dashboards/
cast-imaging-viewer/
Post-install
Location on disk:
/opt/cast/installation/imaging-services/
/opt/cast/installation/imaging-node/
/opt/cast/installation/imaging-dashboards/
/opt/cast/installation/imaging-viewer/
Example
In this example we will change the password for the default Keycloak authentication system both pre-installation and post-installation:
Pre-installation
Add the following to a cast-imaging-services/docker-compose.override.yml file (this file will not yet exist), customize the KEYCLOAK_ADMIN_PASSWORD value and then proceed with the installation.
services:
sso-service:
environment:
KEYCLOAK_ADMIN_PASSWORD: my_custom_password
Post-installation
As above, first create the cast-imaging-services/docker-compose.override.yml file, add in the required syntax shown above, and customize the KEYCLOAK_ADMIN_PASSWORD value. Then run the following to restart the imaging-services containers:
$ cd /opt/cast/installation/imaging services # navigate to the required installation folder
$ sudo docker compose down # stop the containers
$ sudo docker compose up -d # start the containers in detached mode
$ sudo docker ps # check containers are running