services:
  web:
    build:
      context: .
      dockerfile: dockerfile
      network: host
    container_name: nuitdelinfo
    restart: always
    volumes:
      - ./back/data:/app/data
    networks:
      - traefik
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nuitdelinfo.rule=Host(`nuitdelinfo.leizour.fr`)"
      - "traefik.http.routers.nuitdelinfo.entrypoints=websecure"
      - "traefik.http.routers.nuitdelinfo.tls=true"
      - "traefik.http.routers.nuitdelinfo.tls.certresolver=myresolver"
      - "traefik.http.services.nuitdelinfo.loadbalancer.server.port=2486"

networks:
  traefik:
    external: true

