Docker Installation

Overview

Warning

The following configurations and URLs are only for example.

The required data will be supplied on request.

Clone the docker compose configuration as a repository from our deployment git repository.

SSH Configuration

Do following command as root:

$ vim ~/.ssh/config

Paste following content into it:

Host [deploy.host.url]
    Hostname [deploy.host.url]
    Port [deploy.host.port]
    User git
    IdentityFile ~/.ssh/id_ed25519

Please send us the file “id_ed25519.pub” to get the required access.

Installation

First, we have to install docker:

See following links for your distribution:

With this done, clone the repository with following command:

$ git clone git@[deploy.host.url]:docker/ih-crm-plus.git
/opt/bf/ih-crm-plus

Now, go to /opt/bf/ih-crm-plus and create necessary directorys and files:

$ cd /opt/bf/ih-crm-plus
  cp env.sample .env
  mkdir volumes/storage volumes/config

Prepare docker network for crmplus:

$ docker network create crmplus-net

Note

Before cloning the docker images you have to create an access token with scope api in our deployment system.

After you recieved your username and access token you can login in docker deployment.

$ docker login [deploy.host.url]

Configuration

Configure environment for docker and CRM+ application in .env: - set compose profile (productive initialises reverse proxy) - Set your default admin password with CRM_ADMIN_PASSWORD (only on first install). - Optional: set database name, mysql user and custom passwords

Configure SSL Certificates

Required DOMAIN_NAME configured in .env

SSL Certificates via file

Copy configuration for SSL certificates:

$ cp volumes/traefik/config.yml.sample volumes/traefik/config.yml

Place your SSL certificates in volumes/traefik/ssl/.

Now configure certFile and KeyFile in volumes/traefik/config.yml

Example:

# DOMAIN_NAME=crm.example.com

tls:
  certificates:
    - certFile: /etc/traefik/ssl/crm.example.com.cert # e.g fullchain.pem for LE certificates
      keyFile: /etc/traefik/ssl/crm.example.com.key # e.g key.pem for LE certificates

Note

The reverse proxy automaticly uses the right certificate for the configured domain.

SSL Certificates via Lets Encrypt

Create and set rights on acme.json:

$ touch volumes/traefik/acme.json
  chmod 0600 volumes/traefik/acme.json

Edit treafik config in volumes/traefik/traefik.yml uncomment certificatesResolvers section and set your e-mail used for lets encrypt certificates:

certificatesResolvers:
  letsencrypt:
    acme:
      email: your-email@example.com  # place your e mail used for lets encrypt

Uncomment certresolver line in docker-compose.yml.

Note

The reverse proxy automaticly requests the right certificate for the configured domain.

Configure Reverse Proxy

Must set following header:

  • Host

  • X-Forwarded-Proto

  • X-Forwarded-For

  • X-Real-IP

Example for nginx:

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

Run

After full configuration start the containers with:

$ docker compose up -d

Note

On the first install docker compose will pull the containers and then install the CRM+ application. After an estimated time of 5 minutes the CRM+ is intalled and now can be reached under your configured domain.

Warning

The reverse proxy will only acccept and pass request to CRM+ if it was accessd by the configured domain.