angelborroy

How to deploy ACS 6 Community in real envs using official Docker Compose

Blog Post created by angelborroy Moderator on May 18, 2018

Alfresco is delivering a Docker Compose for ACS Community deployment that can only be used for local testing environments:

 

acs-community-deployment/docker-compose at master · Alfresco/acs-community-deployment · GitHub 

 

In order to deploy the product in real environments, some additional configurations must be performed. You can find some of this configurations described at Using Alfresco 201804-EA in a simple PROD environment 

 

However, as it should be advisable to maintain original Alfresco resources untouched, another approach is required. Docker Compose allows to share configuration by using additional YML specification files to override the original one. Below some instructions to configure default Alfresco Docker Compose for ACS 6 Community are provided.

 

Checkout or download official Docker Compose

 

$ git clone git@github.com:Alfresco/acs-community-deployment.git
Cloning into 'acs-community-deployment'...
remote: Counting objects: 145, done.
remote: Compressing objects: 100% (91/91), done.
remote: Total 145 (delta 79), reused 103 (delta 49), pack-reused 0
Receiving objects: 100% (145/145), 27.53 KiB | 240.00 KiB/s, done.
Resolving deltas: 100% (79/79), done.

$ cd acs-community-deployment/docker-compose/

$ ls
docker-compose.yml

 

Create a docker-compose.override.yml file

 

You can add volumes mapping, ports exposition and additional Docker images to original Docker Compose.

 

$ touch docker-compose.override.yml

$ cat docker-compose.override.yml
version: "3"

services:

    httpd:
        build: ./httpd
        ports:
          - 443:443
        links:
          - alfresco
          - share
          - solr6 

    alfresco:
      volumes:
          - ./data/alf-repo-data:/usr/local/tomcat/alf_data
      ports:
          - 21:2121

    postgres:
      volumes:
          - ./data/postgres-data:/var/lib/postgresql/data

    solr6:
      volumes:
          - ./data/solr-data:/opt/alfresco-search-services/data

 

Add your customised images

 

Adding an NGIX or Apache HTTPd server should be recommendable for many environments.

 

$ tree httpd
httpd
├── Dockerfile
└── assets
    ├── CA.pem
    ├── alfresco-vhost.conf
    ├── server.crt
    └── server.key

 

You can use something provided by the Community like this one, or any other you like.

 

Start the composition

 

You can use default commands to run Docker Compose.

Extensions declared in docker-compose.override.yml file will be picked automatically, so your volumes, ports and additional Docker images will be available in the composition.

 

$ docker-compose up -d --build

 

Now Alfresco is running in a real environment by using official (and untouched) Docker Compose resource.

Outcomes