version: "3.9" services: app: build: . # uncomment if you're building image using Dockerfile # image: huedaya/flask-opencv:latest container_name: app-${MK_APP_ID} volumes: - ./:/home/user/app/ ports: - 7860:7860 - 7861:7861 networks: - proxy labels: - "traefik.http.routers.${MK_APP_ID}-secure.rule=(Host(`${HOST}`))" - "traefik.http.routers.${MK_APP_ID}-secure.entrypoints=websecure" - "traefik.docker.network=proxy" - "traefik.enable=true" - "traefik.http.middlewares.${MK_APP_ID}-ratelimit.ratelimit.average=5" - "traefik.http.middlewares.${MK_APP_ID}-ratelimit.ratelimit.burst=2" networks: proxy: external: true