services:
  itsm_postgres_tigase:
    image: postgres:9.6
    restart: always
    environment:
      POSTGRES_PASSWORD: postgres
    volumes:
      - "/opt/tigase/postgres:/var/lib/postgresql/data"
    networks:
      - itsm
  itsm_tigase:
    image: "registry.on-premise.itarian.com/op-tigase:1.0.0"
    restart: always
    volumes:
      - "/opt/tigase/certs:/opt/tigase/certs"
      - "/opt/tigase/logs:/opt/tigase/logs"
    networks:
      - itsm
    ports:
      - 5222:5222
      - 8080:8080
    extra_hosts:
      - "${ITSM_WEB_HOST}:${ITSM_WEB_IP}"
    environment:
      - TIGASE_DOMAIN
      - TIGASE_VIRT_HOSTS
      - PGHOST=itsm_postgres_tigase
      - PGDATABASE=tigase_db
      - PGPASSWORD=tigase_pass
      - PGUSER=tigase_user
      - PG_SUPER_ADMIN=postgres
      - PG_SUPER_ADMIN_PASS=postgres
      - CA_CERT
  itsm_nginx_proxy_tigase:
    image: "registry.on-premise.itarian.com/op-tigase-nginx-proxy:1.0.0"
    restart: always
    network_mode: "host"

networks:
  itsm:

