name: test-web-app

services:
  app:
    build: .
    container_name: test-web-app
    network_mode: bridge
    restart: unless-stopped
    ports:
      - "56001:80"
    volumes:
      - ./:/var/www/html
    environment:
      - APACHE_DOCUMENT_ROOT=/var/www/html
      - TZ=Europe/Prague
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.test-web-app.rule=Host(`test-web-app.ve0.jiripocta.cz`)"
      - "traefik.http.routers.test-web-app.entrypoints=web"
      - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
      - "traefik.http.routers.test-web-app.middlewares=redirect-to-https@docker"
      - "traefik.http.routers.test-web-app-secured.rule=Host(`test-web-app.ve0.jiripocta.cz`)"
      - "traefik.http.routers.test-web-app-secured.entrypoints=web-secure"
      - "traefik.http.routers.test-web-app-secured.tls=true"
      - "traefik.http.routers.test-web-app-secured.tls.certresolver=myhttpchallenge"
      - "traefik.http.routers.test-web-app-secured.service=test-web-app"
      - "traefik.http.services.test-web-app.loadbalancer.server.port=80"