Skip to content

Docker Installation¶

Emakin Docker images are available on Docker Hub at https://hub.docker.com/u/6kare.

Single-Container Deployment¶

Upon starting the container, a default domain is automatically created with the user "admin@emakin.com" and password " admin".

  • Application Access: http://localhost
  • Host Administration: http://localhost:7180

Example Command:

1
docker run -p 80:80 6kare/emakin:8.6

Replace 8.6 with the desired image tag.

Multi-Container Deployment using Docker Compose¶

The Emakin Docker image contains only the application; external dependencies (database, Redis, etc.) must be managed separately. This approach is suitable for more advanced deployment scenarios using Docker Compose or Kubernetes.

Docker Compose Configuration (docker-compose.yml)¶

Create a file named docker-compose.yml with the following content:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: '3'
services:
    web:
        image: 6kare/emakin:8.6
        ports:
            - "80:80"
            - "443:443"
            - "7180:7180"
            - "25:25"
            - "587:587"
            - "465:465"
        depends_on:
            - redis
            - postgre
            - basex
            - tika
        volumes:
            - "emkdata:/app/Configuration/Data"
        environment:
            - AK_DbProvider=PostgreSql
            - AK_DbConnStr=Host=postgre;Database=ALTIKARE;Username=ALTIKARE;Password=ALTIKARE;
            - AK_RedisConnStr=redis,allowAdmin=true
            - AK_BasexConnStr=http://admin:admin@basex:1984/
            - AK_TikaConnStr=http://tika:9998/
            - AK_WopiConnStr=http://onlyoffice:81/hosting/discovery
            - AK_AntivirusServerUrl=tcp://clamav:3310
    postgre:
        image: "postgres"
        restart: always
        volumes:
            # - "/var/run/postgres/postgres.sock:/var/run/postgres/postgres.sock"
            - "pgdata:/var/lib/postgresql/data"
        environment:
            - POSTGRES_USER=ALTIKARE
            - POSTGRES_PASSWORD=ALTIKARE
            - POSTGRES_DB=ALTIKARE
    redis:
        image: "redis:alpine"
        expose:
            - "6379"
    basex:
        image: "6kare/basex"
        expose:
            - "1984"
        volumes:
            - "basexdata:/srv/basex/data"
    tika:
        image: "6kare/tika2"
        restart: always
        expose:
            - 9998
    onlyoffice:
        image: onlyoffice/documentserver
        restart: always
        environment:
            USE_UNAUTHORIZED_STORAGE: "true"
            WOPI_ENABLED: "true"
        expose:
            - "81:80"
            - "8443:443"
    clamav:
        image: "clamav/clamav:latest"
        restart: always
        expose:
            - 3310
        volumes:
            - "clamavdata:/var/lib/clamav"

volumes:
    emkdata:
    pgdata:
    basexdata:
    clamavdata:

Remember to replace placeholder values (database credentials, etc.) with your actual values. Start the services using docker compose up.

Environment Variables¶

The following environment variables configure database connections:

1
2
AK_DbProvider=PostgreSQL  # Or "Oracle", "SqlServer"
AK_DbConnStr=Host=databaseserver;Database=database;Username=user;Password=pass;

Cloudflare Support¶

To enable Cloudflare SSL termination, add the following environment variables to your docker-compose.yml file:

1
2
3
4
environment:
    - AK_Web__ForwardedHeaders__ClearProxies=true
    - AK_Web__ForwardedHeaders__ClearKnownNetworks=true
    - AK_Web__ForwardedHeaders__ForwardedForHeaderName=CF-Connecting-IP

See SSL Termination for more details.

Proxy Support¶

When operating within an environment that utilizes a proxy server, Docker containers require specific environment variables to facilitate connections to external services, such as SSL certificate providers, for verification purposes. Failure to configure these proxy settings may result in errors such as "SSL connection closed (SSL_ERROR_SYSCALL)" when attempting to access the Emakin web server or other external resources.

To specify proxy connection details for the Docker containers, include the following environment variables within your docker-compose.yml file for the relevant service(s):

1
2
3
environment:
  - http_proxy=myproxyserver:8080
  - https_proxy=myproxyserver:8080

Replace myproxyserver:8080 with the actual hostname or IP address and port of your HTTP and HTTPS proxy servers. These variables instruct the container's processes to route HTTP and HTTPS traffic through the specified proxy.

Docker Compose with Load Balancer (HAProxy)¶

The following docker-compose.yml example demonstrates deploying Emakin with HAProxy for load balancing across multiple web application instances:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# ... (previous services definition) ...
haproxy:
    image: haproxy:latest
    volumes:
        - "./haproxy.cfg:/usr/local/etc/haproxy:ro" # Path to HAProxy config
    restart: always
    ports:
        - "80:80"
        - "443:443"
        - "7180:7180"
        - "25:25"
        - "587:587"
        - "465:465"

# ... (rest of the configuration) ...

You'll need to create a separate HAProxy configuration file (haproxy.cfg). A sample configuration is provided below. Adapt this to your environment's IP addresses and port settings.

Sample haproxy.cfg:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
frontend http
    bind *:80
    bind *:443
    bind *:5000
    mode http
    timeout client 1000s
    use_backend all

backend all
    mode http
    timeout server 1000s
    timeout connect 1000s
    server s1 web1:80
    server s2 web2:80
    server s3 web3:80