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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

angelborroy
Alfresco Employee
6 3 5,988

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 https://community.alfresco.com/community/ecm/blog/2018/05/01/using-alfresco-201804-ea-in-a-simple-pr... 

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.

About the Author
Angel Borroy is Hyland Developer Evangelist. Over the last 15 years, he has been working as a software architect on Java, BPM, document management and electronic signatures. He has been working with Alfresco during the last years to customize several implementations in large organizations and to provide add-ons to the Community based on Record Management and Electronic Signature. He writes (sometimes) on his personal blog http://angelborroy.wordpress.com. He is (proud) member of the Order of the Bee.
3 Comments