Manage volumes in Docker

This topic describes the various volumes that can be mounted for our products along with the scenarios they can be used in.

Note: The folders you mount, must be owned by user 10001. For example, if you want to mount directories under ~/XebiaLabs/ folder, to change the ownership, run the command sudo chown -R 10001 ~/XebiaLabs/ .

By default, the environment variable APP_ROOT points to /opt/xebialabs and APP_HOME points to /${APP_ROOT}/xl-deploy-server. Typically, there is no need to change them.

The following locations can be mounted as volumes to provide either configuration data, and/or persistent storage for application data.

${APP_HOME}/conf - This directory contains the configuration files and keystores for Deploy. If mounted it is possible to configure (and inject) non-default configuration settings.

  • The Central Configuration files (XL_DEPLOY_SERVER_HOME/centralConfiguration) are generated by the container startup script based on the environment variables set. To prevent this from happening, you can set the GENERATE_XL_CONFIG environment variable to false. Once the variable is set, the XL_DEPLOY_SERVER_HOME/centralConfiguration files for the product will not be generated based on environment variables, and you would have to provide this file yourself.
  • If you provide a file called deployit.conf in the conf folder mounted, you need to provide the relevant values for the attributes in your file as shown below:

  • The configuration files mentioned below can also be overwritten by providing the relevant attribute values, in the mounted volume. A default value will be used for any file not provided in the mounted volume.

    • deployit-security.xml
    • logback-access.xml
    • logback.xml
    • wrapper-daemon.vm
    • xl-deploy.policy
    • xld-wrapper-server.conf
    • xld-wrapper-worker.conf
    • xld-wrapper.conf.common
    • xld-wrapper.conf.posix

${APP_HOME}/hotfix/lib - This directory contains the hotfixes for the libraries used by Deploy. When instructed by Support personnel, you should drop any delivered hotfixes in here.

${APP_HOME}/hotfix/plugins - This directory contains the hotfixes for the plugins used by Deploy. When instructed by Support personnel, you should drop any delivered plugin hotfixes in here.

${APP_HOME}/ext - This directory contains the developed (exploded plugins) for Deploy. You can customize an existing plugin here. For example, you can modify the synthetic.xml for a specific plugin here.

${APP_HOME}/plugins - This directory contains the plugins that are running in Deploy. When mounted, plugins present in this directory will be loaded instead of bundled ones. If any base plugin is not provided, it will be loaded from default plugins. If you mount an empty directory, the default bundled plugins will be loaded. But it is recommended to use a custom image with required plugins to avoid issues during the upgrade process.

${APP_HOME}/repository - This directory contains the embedded repository database for Deploy. Using the configuration injected through the ${APP_HOME}/conf volume, it is possible to configure the used database to a remotely running database engine, instead of using the one based on embedded memory. It is highly recommended not to use the embedded DB for production setup.

${APP_HOME}/export - This directory holds the exported CIs when using the CI export option in Deploy

${APP_HOME}/work - This directory will be used to save task data, task recovery files, uploaded files and temp files in Deploy. The task recovery files can be used in cases on container restarts if mounted externally to recover tasks.

Here is an example of mounting volumes for Deploy with docker compose:

version: "2"
    image: xebialabs/xl-deploy:9.5.0
    container_name: xl-deploy
      - "4516:4516"
      - ~/XebiaLabs/xl-deploy-server/conf:/opt/xebialabs/xl-deploy-server/conf
      - ~/XebiaLabs/xl-deploy-server/hotfix/lib:/opt/xebialabs/xl-deploy-server/hotfix/lib
      - ~/XebiaLabs/xl-deploy-server/hotfix/plugins:/opt/xebialabs/xl-deploy-server/hotfix/plugins
      - ~/XebiaLabs/xl-deploy-server/ext:/opt/xebialabs/xl-deploy-server/ext
      - ~/XebiaLabs/xl-deploy-server/plugins:/opt/xebialabs/xl-deploy-server/plugins
      - ~/XebiaLabs/xl-deploy-server/repository:/opt/xebialabs/xl-deploy-server/repository
      - ~/XebiaLabs/xl-deploy-server/repository:/opt/xebialabs/xl-deploy-server/export
      - ~/XebiaLabs/xl-deploy-server/repository:/opt/xebialabs/xl-deploy-server/work
      - ADMIN_PASSWORD=admin
      - GENERATE_XL_CONFIG=false