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 docker hub https://hub.docker.com/u/6kare address.

...

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

...

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 new text file with "docker-compose.yml" name paste following content in file. After saved you can start emakin with "docker compose up" command.

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

Code Block
version: '3'
services:
  haproxy:
    image: haproxy:latest
    volumes:
      - "./haproxy/config:/usr/local/etc/haproxy:ro"
    restart: always
    ports:
      - "80:80"
      - "443:443"
      - "5000:5000"
  web1:
    image: 6kare/emakin:latest
    expose:
      - "80"
      - "5000"
    volumes:
      - "ftdata:/ftdata"
    depends_on:
      - redis
      - postgres
      - basex
      - tika
    environment:
      - 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=/ftdata
  web2:
    image: 6kare/emakin:latest
    expose:
      - "80"
      - "5000"
    volumes:
      - "ftdata:/ftdata"
    depends_on:
      - redis
      - postgres
      - basex
      - tika
    environment:
      - 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=/ftdata
  web3:
    image: 6kare/emakin:latest
    expose:
      - "80"
      - "5000"
    volumes:
      - "ftdata:/ftdata"
    depends_on:
      - redis
      - postgres
      - basex
      - tika
    environment:
      - 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=/ftdata
  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: "basex/basexhttp"
    expose:
      - "1984"
    volumes:
      - "basexdata:/srv/basex/data"
  tika:
    image: "6kare/tika"
    restart: always
    expose:
      - 9998
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