Versions Compared

Key

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

...

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

Code Block
version: '34'
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:[email protected]: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:[email protected]: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:[email protected]: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:

...