{% include 'roles/docker-compose/templates/base.yml.j2' %}
  application:
    logging:
      driver: journald
      options:
        tag: "mybb_application"
    image: {{ mybb_image }}:{{ mybb_version }}
    container_name: {{ mybb_name }}
    restart: {{ DOCKER_RESTART_POLICY }}
    volumes:
      - data:/var/www/html
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}

  server:
    logging:
      driver: journald
      options:
        tag: "mybb_server"
    image: nginx:mainline
    restart: {{ DOCKER_RESTART_POLICY }}
    ports:
      - "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
    volumes:
    - "{{docker_compose_instance_confd_directory}}:{{target_mount_conf_d_directory}}:ro"
    - "data:/var/www/html:ro"
{% include 'roles/docker-container/templates/networks.yml.j2' %}

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

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