version: "3.3"

networks:
  http_network:
    external: true
services:
  app:
    image: huskyteufel/webshop
    restart: always
    environment:
      - DB_HOST=172.17.0.1
      - DB_USER=hochzeit
      - DB_PASS=hochzeit
      - DB_DATA=hochzeit
      - PROXYIP=172.19.0.9
      #volumes:
      #- /var/run/docker.sock:/var/run/docker.sock
      #- portainer_data:/data
    labels:
      # Frontend
      - "traefik.enable=true"
      - "traefik.http.routers.hochzeit.entrypoints=http"
      - "traefik.http.routers.hochzeit.rule=Host(`shop.cosysda.de`)"
      - "traefik.http.middlewares.hochzeit-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.hochzeit.middlewares=hochzeit-https-redirect"
      - "traefik.http.routers.hochzeit-secure.entrypoints=https"
      - "traefik.http.routers.hochzeit-secure.rule=Host(`shop.cosysda.de`)"
      - "traefik.http.routers.hochzeit-secure.tls=true"
      - "traefik.http.routers.hochzeit-secure.tls.certresolver=http"
      - "traefik.http.routers.hochzeit-secure.service=hochzeit"
      - "traefik.http.services.hochzeit.loadbalancer.server.port=9000"
      - "traefik.docker.network=http_network"
        #- "traefik.http.routers.frontend.entrypoints=websecure"
        #- "traefik.http.services.frontend.loadbalancer.server.port=9000"
        #- "traefik.http.routers.frontend.service=frontend"
      #- "traefik.http.routers.frontend.tls.certresolver=leresolver"
      # Edge
      #- "traefik.http.routers.edge.rule=Host:edge.cosysda.de"
      #- "traefik.http.routers.edge.entrypoints=websecure"
      #- "traefik.http.services.edge.loadbalancer.server.port=8000"
      #- "traefik.http.routers.edge.service=edge"
      #- "traefik.http.routers.edge.tls.certresolver=leresolver"
    networks:
      - http_network
        #volumes:
      #portainer_data:
