Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Docker images are distributed with 2 different container types. All images are hosted in the docker hub https://hub.docker.com/u/6kare address.

...

Emakin Standalone contains all the required dependencies to run emakin. The standalone image should be used for testing purposes, and it's not recommended for production usage.

Code Block
languagebash
docker run -p 80:80 6kare/emakin-standalone:latest

On container start, the default domain is automatically created with "admin@emakin.com" user and "admin" password. The application can be accessed from from http://localhost address, and  and the host administration settings can be accessed from from http://localhost/hostadm address address.

...

By default, the application data is reset when the container is restarted. Therefore, if you need to persist the application data, docker mounts must be used to keep the stored data between restarts.

Code Block
languagebash
docker run -p 80:80 --mount source=emakindata,target=/var/lib/postgresql/data --mount source=emakindata,target=/srv/basex/data 6kare/emakin-standalone:latest

Emakin Container

Emakin image does not contain any dependency but the application image. Other dependencies like database, Redis etc., should be configured externally. This image should be used for more advanced scenarios like Docker Compose or Kubernetes.

Code Block
languagebash
docker run -p 80:80 6kare/emakin:latest8.5

Environment Variables

External database connections can be specified with the following environment variables. The default database provider is "Postgre", but "Oracle" and "SqlServer" can be used as well.

Code Block
languagebash
AK_DbProvider=Postgre
AK_DbConnStr=Host=databaseserver;Database=database;Username=user;Password=pass;

...

Emakin container can be deployed with the following Docker Compose file. Create a new text file with "docker-compose.yml" name and paste the following content in into the file. After saved saving you can start emakin with the "docker compose up" command.

Code Block
languageyml
version: '43'
services:
    web:
        image: 6kare/emakin:latest
		hostname: emakinapp8.5
          ports:
            - "80:80"
            - "443:443"
            - "7180:7180"
            - "25:25"
            - "587:587"
            - "465:465"
        depends_on:
            - redis
            - postgre
            - basex
            - tika
        volumes:
            - "emkdata:/dataapp/Configuration/Data"
        environment:
            - AK_DbProvider=PostgrePostgreSql
            - 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/tika/
            - AK_WopiConnStr=http://onlyoffice:81/hosting/discovery
            - AK_FULLTEXTCATALOGPATHAntivirusServerUrl=tcp:/data/ftclamav: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/basexhttp"
        expose:
            - "1984"
        volumes:
            - "basexdata:/srv/basex/data"
    tika:
        image: "6kare/tikatika2"
        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:
     emkdata:
clamavdata:

CloudFlare Support

To support Cloudflare SSL termination please add the following environment variables to compose file. Please see the SSL termination page for more details.

Code Block
environment:
    -AK_Web__ForwardedHeaders__ClearProxies=true
    -AK_Web__ForwardedHeaders__ClearKnownNetworks=true
    -AK_Web__ForwardedHeaders__ForwardedForHeaderName=CF-Connecting-IP

Compose File With Load Balancer

Emakin also supports the load balancer scenarios with HAProxy under docker and can be deployed with the following Docker Compose file. Create a new text file with "docker-compose.yml" name and paste following content in into file. After saved saving you can start emakin with the "docker compose up" command.

This sample fires 3 clone of web application that clones connected to the same postgres database.

Code Block
languageyaml
version: '4'
services:
  haproxy:
    image: haproxy:latest
    volumes:
      - "./haproxy/config:/usr/local/etc/haproxy:ro"
    restart: always
    ports:
      - "80:80"
      - "443:443"
      - "7180:7180"
      - "5000:5000"25:25"
      - "587:587"
      - "465:465"
  web1:
    image: 6kare/emakin:latest8.5
    hostname: emakinapp1
    expose:
      - "80"
      - "5000"
    volumes:
      - "ftdata:/ftdata"
    depends_on:
      - redis
      - postgres
      - basex
      - tika
    volumes:
      - "emkdata:/app/Configuration/Data"
    environment:
      - AK_DbProvider=PostgreSql
      - AK_DbConnStr=Host=postgres;Database=ALTIKARE;Username=ALTIKARE;Password=ALTIKARE;
      - AK_RedisConnStr=redis,allowAdmin=true
      - AK_BasexConnStr=http://admin:admin@basex:1984/
      - AK_TikaConnStr=http://tika:9998/tika
      - AK_FULLTEXTCATALOGPATH=/ftdataWopiConnStr=http://onlyoffice:81/hosting/discovery
      - AK_AntivirusServerUrl=tcp://clamav:3310
  web2:
    image: 6kare/emakin:latest8.5
    hostname: emakinapp2
    expose:
      - "80"
      - "7180"
      - "25:25"
      - "587:587"
      - "5000465:465"
    volumes:
      - "ftdataemkdata:/app/Configuration/ftdataData"
    depends_on:
      - redis
      - postgres
      - basex
      - tika
      - onlyoffice
    environment:
      - AK_DbProvider=PostgreSql
      - AK_DbConnStr=Host=postgres;Database=ALTIKARE;Username=ALTIKARE;Password=ALTIKARE;
      - AK_RedisConnStr=redis,allowAdmin=true
      - AK_BasexConnStr=http://admin:admin@basex:1984/
      - AK_TikaConnStr=http://tika:9998/tika
      - AK_FULLTEXTCATALOGPATH=/ftdataWopiConnStr=http://onlyoffice:81/hosting/discovery
      - AK_AntivirusServerUrl=tcp://clamav:3310
  web3:
    image: 6kare/emakin:latest:8.5
    hostname: emakinapp3
    expose:
      - "80"
      - "50007180"
      - "25:25"
      - "587:587"
      - "465:465"
    volumes:
      - "ftdataemkdata:/app/ftdataConfiguration/Data"
    depends_on:
      - redis
      - postgres
      - basex
      - tika
      - onlyoffice
    environment:
      - AK_DbProvider=PostgreSql
      - AK_DbConnStr=Host=postgres;Database=ALTIKARE;Username=ALTIKARE;Password=ALTIKARE;
      - AK_RedisConnStr=redis,allowAdmin=true
      - AK_BasexConnStr=http://admin:admin@basex:1984/
      - AK_TikaConnStr=http://tika:9998/tika
      - AK_FULLTEXTCATALOGPATH=/ftdataWopiConnStr=http://onlyoffice:81/hosting/discovery
      - AK_AntivirusServerUrl=tcp://clamav:3310
  postgres:
    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/basexhttp"
    expose:
      - "1984"
    volumes:
      - "basexdata:/srv/basex/data"
  tika:
    image: "6kare/tikatika2"
    restart: always
    expose:
      - 9998
  onlyoffice:
    image: onlyoffice/documentserver
    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:
  pgdata:
  basexdata:
  ftdata:

HAProxy configuration

Code Block
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

...