Not able to connect to keyclock with traefik

Getting "Gateway timeout" error while trying to connect https://security.sachgeo.xyz/
given below is my docker-compose file.
we are trying to connect the keylock configured is docker with traefik.

DOCKER COMPOSE FILE

version: '3'

services:
  traefik:
    image: 'traefik:v2.6'
    ports:
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - '$PWD/services/traefik/traefik.prod.toml:/etc/traefik/traefik.toml'
        #  - ./traefik.prod.toml:/etc/traefik/traefik.toml
    command:
      - --api.dashboard=true
      - --providers.docker

    labels:
      - traefik.http.routers.traefik.rule=Host(`monitor.sachgeo.xyz`)
      - traefik.http.routers.traefik.service=api@internal
      - traefik.http.routers.traefik.tls=true
      - traefik.http.routers.traefik.tls.certresolver=letsencrypt


  mysql-kc:
    image: mysql:8.0.27
    ports:
      - 3366:3306
    restart: unless-stopped
    environment:
      # The user, password and database that Keycloak
      # is going to create and use
      MYSQL_USER: keycloak_user
      MYSQL_PASSWORD: keycloak_password
      MYSQL_DATABASE: keycloak_db
      # Self-Explanatory
      MYSQL_ROOT_PASSWORD: root_password
    volumes:
      - keycloak-and-mysql-volume:/var/lib/mysql
    networks:
      - keycloak-and-mysql-network

  keycloak-w:
    image: jboss/keycloak:16.1.0
    expose:
      - 8100
    restart: unless-stopped
    environment:
      # User and password for the Administration Console
      KEYCLOAK_USER: admin_user
      KEYCLOAK_PASSWORD: admin_password
      KC_PROXY_ADDRESS_FORWARDING: "true"
      KC_HOSTNAME_STRICT: "false"
      KC_HOSTNAME: security.sachinpb.xyz
      KC_PROXY: edge
      KC_HTTP_ENABLED: "true"
      DB_VENDOR: mysql
      DB_ADDR: mysql-kc
      DB_PORT: 3306
      # Same values as the mysql-kc service
      DB_USER: keycloak_user
      DB_PASSWORD: keycloak_password
      DB_DATABASE: keycloak_db
    command: ["-Djboss.http.port=8100"]
    depends_on:
      - mysql-kc
    networks:
      - keycloak-and-mysql-network
    labels:
      - traefik.enable=true
      - traefik.http.routers.fastapi.rule=Host(`security.sachgeo.xyz`)
      - traefik.http.routers.fastapi.tls=true
      - traefik.http.routers.fastapi.tls.certresolver=letsencrypt

networks:
  keycloak-and-mysql-network:

volumes:
  keycloak-and-mysql-volume:

Traefik only supports a single static configuration, either via command (line) or config file. You are trying to use both, that does not work.

PS: You should use a more current Traefik version.