How to create a docker-compose deployment using multiple files

This guide walks you through how to create a docker-compose deployment using multiple files. We start by creating a simple compose file where it uses the nginx image that will serve a page in a directory that is passed into the container via a mount.

Note: The volume mount is relative to the root directory of where you will be building your zipfile. In our case, we will have a data directory that will be mounted into the container. This directory will be named data and will be mounted read-only, although it is possible to make this mount read/write.


version: '3'  
  image: nginx
      - ./data:/usr/share/nginx/html:ro
    - "80:80"
  command: [nginx-debug, '-g', 'daemon off;']  

Our page is a very simple HTML page that tells us that things worked.


<!DOCTYPE html>
        <title>Included File Test</title>
        <p>If you're seeing this, the included file worked...</p>

We now create a manifest file that provides a path to our compose file (in this case, we are only using one file but this method allows you to use multiple files if necessary).


- docker-compose.yml  

Our directory structure looks like this:

├── data
│   └── index.html
├── docker-compose.yml
└── manifest.yml  

We now create our zipfile:

$ zip -r *
updating: data/ (stored 0%)
updating: docker-compose.yml (deflated 18%)
updating: data/index.html (deflated 32%)
  adding: manifest.yml (deflated 17%)  

Now, the file can either be uploaded to artifactory (preferred method, since it uses the artifactory security settings) or via a webserver. Note that if you use a webserver, the MeX will need to be able to access it, which does not allow for the use of authentication.

$ curl -q -u demo -T ./
Enter host password for user 'demo':
  "repo" : "repo-demoorg",
  "path" : "/",
  "created" : "2020-05-21T15:42:12.759Z",
  "createdBy" : "demo",
  "downloadUri" : "",
  "mimeType" : "application/zip",
  "size" : "909",
  "checksums" : {
    "sha1" : "696ca6354935c0fabc2b4e9853b77d1d259412f3",
    "md5" : "6075b505ca0e7417a213ccb8fe5c91d7",
    "sha256" : "666eac3c030ba5a58e738e4b79f7f326c14fcecb38a3284fb3c1d5510fcddcc1"
  "originalChecksums" : {
    "sha256" : "666eac3c030ba5a58e738e4b79f7f326c14fcecb38a3284fb3c1d5510fcddcc1"
  "uri" : ""

Once you have received confirmation in the form of the json format returned above, you can move on to the steps for deploying a docker instance through the MeX console. There are two important things to keep in mind:

  • You should leave the Image Path field blank in the console.
  • You should provide the full URL for the Zip file in the Deployment Manifest text box. For example, the above ZIP file should be referenced as