disaster37 / rancher-alfresco

MIT License
7 stars 12 forks source link

rancher-alfresco

Table of Contents

Introduction

Dockerfile to build an Alfresco container image.

Docker Repository on Quay

Contributing

Here is how you can help:

Note

This docker image is created to run on Rancher ecosystem. You can also play it directly on top of Docker.

For more information about to run Alfresco on Rancher on few seconds, read my blog.

Installation

Pull the image from the docker index.

docker pull webcenter/rancher-alfresco:latest

or pull a particular version:

docker pull webcenter/rancher-alfresco:5.2-201612GA

Alternatively, you can build the image yourself:

git clone https://github.com/disaster37/rancher-alfresco.git
cd rancher-alfresco
docker build --tag="$USER/alfresco" .

Quick Start

If you are french, you can read my blog to found more advance usage. For exemple how to deploy Alfresco in few minutes on Rancher for production usage.

Use Rancher

Go on catalog and search Alfresco. Just click on deploy. Congratulation, you have Alfresco.

Docker-compose

Download the docker-compose file from my git repository, and run :

docker-compose up

Congratulation, you have Alfresco.

Docker

Run the alfresco image with the name "alfresco".

docker run --name='alfresco' -it --rm -p 8080:8080 webcenter/rancher-alfresco

NOTE: Please allow a few minutes for the application to start, especially if populating the database for the first time.

Go to http://localhost:8080 or point to the ip of your docker server.

The default username and password are:

Run Alfresco for production purpose

External database

It's a good way to run the dabase on external container. You can use PostgreSQL (the best way) or MySQL. If you use official PostgreSQL container or official MySQL Container, it's supported out of the box.

Start Database PostgreSQL

docker run -d --name "postgres" \
  -e 'PGDATA=/var/lib/postgresql/data/pgdata' \
  -e 'POSTGRES_DB=alfresco' \
  -e 'POSTGRES_USER=alfresco' \
  -e 'POSTGRES_PASSWORD=password'\
  -v /host/alfresco_database=/var/lib/postgresql/data/pgdata \
  postgres:9.4

Start Alfresco

docker run -d --name "alfresco" \
  --link postgres:db \
  -p 7070:7070 -p 8080:8080 \
  -v /host/alfresco_data=/opt/alfresco/alf_data \
  webcenter/rancher-alfresco:5.2-201612GA

Reverse Proxy

To run Alfresco behind a Reverse Proxy, you need to add extra parameter like this :

docker run -d --name "alfresco" \
  -e 'REVERSE_PROXY_URL=https://ged.my-domain.com' \
  --link postgres:db \
  -p 7070:7070 -p 8080:8080 \
  -v /host/alfresco_data=/opt/alfresco/alf_data \
  webcenter/rancher-alfresco:5.2-201612GA

Mail setting

To allow Alfresco send and receive mail, you need to add extras parameters :

docker run -d --name "alfresco" \
  -e 'MAIL_HOST=smpt.my-domain.local' \
  -e 'MAIL_PORT=25' \
  -e 'MAIL_PROTOCOL=smtp'\
  -e 'MAIL_USER=login' \
  -e 'MAIL_PASSWORD=password' \
  -p 7070:7070 -p 8080:8080 \
  --link postgres:db \
  -v /host/alfresco_data=/opt/alfresco/alf_data \
  webcenter/rancher-alfresco:5.2-201612GA

FTP setting

To enable FTP on ALfresco :

docker run -d --name "alfresco" \
  -e 'FTP_ENABLED=true' \
  -e 'FTP_PORT=21' \
  -p 21:21 -p 7070:7070 -p 8080:8080 \
  --link postgres:db \
  -v /host/alfresco_data=/opt/alfresco/alf_data \
  webcenter/rancher-alfresco:5.2-201612GA

CIFS

To access on alfresco as a Windows share, you must setting CIFS :

docker run -d --name "alfresco" \
  -e 'CIFS_ENABLED=true' \
  -e 'CIFS_SERVER_NAME=localhost' \
  -e 'CIFS_DOMAIN=WORKGROUP' \
  --link postgres:db \
  -p 445:445 -p 7070:7070 -p 8080:8080 \
  -v /host/alfresco_data=/opt/alfresco/alf_data \
  webcenter/rancher-alfresco:5.2-201612GA

LDAP authentification

To enable LDAP authentification, you must use the following parameters :

docker run -d --name "alfresco" \
  -e 'LDAP_ENABLED=true' \
  -e 'LDAP_AUTH_FORMAT==uid=%s,cn=users,cn=accounts,dc=example,dc=com' \
  -e 'LDAP_HOST=dc.exemple.com' \
  -e 'LDAP_USER=login' \
  -e 'LDAP_PASSWORD=password' \
  -e 'LDAP_ADMINS=administrator' \
  -e 'LDAP_GROUP_SEARCHBASE=cn=groups,cn=accounts,dc=example,dc=com' \
  -e 'LDAP_USER_SEARCHBASE=cn=users,cn=accounts,dc=example,dc=com' \
  -p 445:445 -p 7070:7070 -p 8080:8080 \
  --link postgres:db \
  -v /host/alfresco_data=/opt/alfresco/alf_data \
  webcenter/rancher-alfresco:5.2-201612GA

VTI external access

To enable the VTI for remote access, you must use the following parameters :

docker run -d --name "alfresco" \
  -e 'VTI_HOST=vti.mydomain.com' \
  -e 'VTI_PORT=7070' \
  --link postgres:db \
  -p 445:445 -p 7070:7070 -p 8080:8080 \
  -v /host/alfresco_data=/opt/alfresco/alf_data \
  webcenter/rancher-alfresco:5.2-201612GA

Parameters

Below is the complete list of currently available parameters that can be set using environment variables.

Upgrading

TODO: I might be able to add some options that aid in upgrading. For now though, backup, backup, backup, and then follow this guide:

References