You are here

Deploy using Docker Compose

Use this information to quickly deploy Alfresco Governance Services using Docker Compose.

Prerequisites

  • Docker
    • This allows you to run Docker images and Docker Compose on a single computer.
  • Docker Compose
    • Docker Compose is included as part of some Docker installers. If it's not part of your installation, then install it separately after you've installed Docker.
  • Access to Quay.
    • Docker requires access to certain images which are stored on Quay. You need to use the correct credentials provided by Alfresco to access these images. Contact Alfresco Support to request the credentials.
Note: Make sure that the following ports are free on your computer: 5432, 8080, 8082, 8083. These ports are set in the docker-compose.yml file.
  1. Download the latest Alfresco Content Services docker-compose.yml file by accessing the trial download page. Save the file in a local folder.
  2. Download the latest Alfresco Community Edition docker-compose.yml file by accessing acs-community-deployment page. Save the file in a local folder.
  3. Edit the file and change the following two services (Add a # prefix to the Alfresco Content Repository and Alfresco Share locations so they are commented out and add the Alfresco Governance locations):

    services:
        alfresco:
            #image: alfresco/alfresco-content-repository:6.0.0.1
            image: quay.io/alfresco/alfresco-governance-repository-enterprise:3.0.0 
            mem_limit: 1500m
            environment:
                JAVA_OPTS: "
                    -Ddb.driver=org.postgresql.Driver
                    -Ddb.username=alfresco
                    -Ddb.password=alfresco
                    -Ddb.url=jdbc:postgresql://postgres:5432/alfresco
                    -Dsolr.host=solr6
                    -Dsolr.port=8983
                    -Dsolr.secureComms=none
                    -Dsolr.base.url=/solr
                    -Dindex.subsystem.name=solr6
                    -Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
                    -Djodconverter.url=http://libreoffice:8090/
                    -Dimg.url=http://imagemagick:8090/
                    -Dshare.host=localhost
                    -Ddeployment.method=DOCKER_COMPOSE
                    -Dcsrf.filter.enabled=false
                    -DtrialUid=id10814454
                    -Xms1g
                    -Xmx1g
                    "
             ports:
                - 8082:8080 #Browser port
        share:
            #image: alfresco/alfresco-share:6.0
            image: quay.io/alfresco/alfresco-governance-share-enterprise
            mem_limit: 1g
            environment:
                - REPO_HOST=alfresco
                - REPO_PORT=8080
                - "CATALINA_OPTS= -Xms500m -Xmx500m"
            ports:
                - 8080:8080
  4. In a command prompt log in to Quay using the following command:

    $ docker login quay.io
                login against server at https://quay.io/v1/
                Username: <<Quay.io Credential Username>>
                Password: <<Quay.io Credential Password>>
  5. In the command prompt change directory to the location of the docker-compose.yml file and deploy Alfresco Governance Services using the following command:

    docker-compose up

    This downloads the images, fetches all the dependencies, creates each container, and then starts the system. If you downloaded the project and changes were made to the project settings, any new images will be pulled from Quay before the system starts.

  6. As an alternative, you can also start the containers in the background by running:

    docker-compose up -d
  7. Wait for the logs to complete.

    ...
    alfresco_1               | 2018-10-05 13:59:36,469  INFO  [management.subsystems.ChildApplicationContextFactory] [http-nio-8080-exec-1] Starting 'Search' subsystem, ID: [Search, managed, solr6]
    alfresco_1               | 2018-10-05 13:59:36,903  INFO  [management.subsystems.ChildApplicationContextFactory] [http-nio-8080-exec-1] Startup of 'Search' subsystem, ID: [Search, managed, solr6] complete

    If you encounter errors whilst the system is starting up:

    • Stop the session (by using CONTROL+C).
    • Remove the container (using the --rmi all option): For example docker-compose down --rmi all.
    • Try allocating more memory resources, as advised in docker-compose.yml. For example, in Docker, change the memory setting in Preferences (or Settings) > Advanced > Memory, to at least 6 GB. Make sure you restart Docker and wait for the process to finish before continuing.
    • Go back and retry the deployment.
    Note: Although 16 GB is the required minimum memory setting, keep in mind that 6 GB is much lower than the required minimum, and may need to be adapted for your environment.
  8. Open your browser and check everything starts up correctly:

    • Share: http://localhost:8080/share

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.