{% include 'roles/docker-compose/templates/base.yml.j2' %}

  onlyoffice:
    {% include 'roles/docker-container/templates/base.yml.j2' %}
    image: "{{ ONLYOFFICE_IMAGE }}:{{ ONLYOFFICE_VERSION }}"
    container_name: {{ ONLYOFFICE_CONTAINER }}
    ports:
      - "127.0.0.1:{{ http_port }}:{{ container_port }}"
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
    volumes:
      - data:/var/www/onlyoffice/Data
      - logs:/var/log/onlyoffice
      - fonts:/usr/share/fonts/truetype/custom
      - lib:/var/lib/onlyoffice
      - pgdata:/var/lib/postgresql
      - redisdata:/var/lib/redis
      - rabbitmqdata:/var/lib/rabbitmq
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}

{% include 'roles/docker-compose/templates/networks.yml.j2' %}

{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
  data:
    name: {{ ONLYOFFICE_VOLUME_DATA }}
  logs:
    name: {{ ONLYOFFICE_VOLUME_LOGS }}
  fonts:
    name: {{ ONLYOFFICE_VOLUME_FONTS }}
  lib:
    name: {{ ONLYOFFICE_VOLUME_LIB }}
  pgdata:
    name: {{ ONLYOFFICE_VOLUME_PGDATA }}
  redisdata:
    name: {{ ONLYOFFICE_VOLUME_REDIS }}
  rabbitmqdata:
    name: {{ ONLYOFFICE_VOLUME_RABBITMQ }}
