version: "3.3"

services:

  zammad:
    image: zammad/zammad:latest
    container_name: zammad-app
    restart: always
    ports:
      - "8100:3000"
    environment:
      - RAILS_ENV=production
    volumes:
      - /home/icke/zammad/app:/opt/zammad
    depends_on:
      - zammad-db
      - zammad-es

  zammad-db:
    image: postgres:13
    container_name: zammad-db
    restart: always
    environment:
      POSTGRES_USER: zammad
      POSTGRES_PASSWORD: zammad
      POSTGRES_DB: zammad
    volumes:
      - /home/icke/zammad/postgres:/var/lib/postgresql/data

  zammad-es:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
    container_name: zammad-es
    restart: always
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=false
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - /home/icke/zammad/elasticsearch:/usr/share/elasticsearch/data

