{% include 'roles/docker-compose/templates/base.yml.j2' %}
  application:
    {{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
      args:
        CHESS_VERSION: "{{ CHESS_VERSION }}"
        CHESS_REPO_URL: "{{ CHESS_REPO_URL }}"
        CHESS_REPO_REF: "{{ CHESS_REPO_REF }}"
        CHESS_ENTRYPOINT_REL: "{{ CHESS_ENTRYPOINT_REL }}"
        CHESS_ENTRYPOINT_INT: "{{ CHESS_ENTRYPOINT_INT }}"
        CHESS_APP_DATA_DIR: "{{ CHESS_APP_DATA_DIR }}"
        CONTAINER_PORT: "{{ container_port | string }}"
    image: "{{ CHESS_CUSTOM_IMAGE }}"
    container_name: "{{ CHESS_CONTAINER }}"
    hostname: "{{ CHESS_HOSTNAME }}"
    ports:
      - "127.0.0.1:{{ ports.localhost.http[application_id] }}:{{ container_port }}"
    volumes:
      - 'data:{{ CHESS_APP_DATA_DIR }}'
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}

{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
  data:
    name: {{ CHESS_DATA_VOLUME }}

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