version: "3"

services:

  app:
    # values set in configuration: noreply_email_user - noreply_email_pass - smtp_host - smtp_port 
    build: .
    image: "dokuwiki--{{ ansible_date_time.date }}--{{ ansible_date_time.hour }}-{{ ansible_date_time.minute }}-{{ ansible_date_time.second }}"
    restart: always
    volumes:
      - /srv/dokuwiki/data/:/var/www/html
      - /srv/dokuwiki/pdftemplate/:/var/www/html/lib/plugins/dw2pdf/tpl/warpzone/
    labels:
      - traefik.enable=true
      - traefik.http.routers.{{ servicename }}.rule=Host(`{{ domain }}`)
      - traefik.http.routers.{{ servicename }}.entrypoints=websecure
      - traefik.http.services.{{ servicename }}.loadbalancer.server.port=80      
    networks:
      - default      
      - web  
    
networks:
  web:
    external: true    
