Invalid mount config for type…" on worker node

after running command
docker stack deploy -c docker-compose.yml flask_app

docker service is started with 3 replica but all replicas are created on manager node. and worker node giving invalid mount config for type… error

Dockerfile

FROM python:3.7
COPY ./requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY ./app /app
WORKDIR /app
CMD ["python", "app.py"]

docker-compose.yml

version: '3'
services:
  fast:
    image: test_swarm_fast:latest
    build: .
    volumes:
      - .:/usr/scr/app
    ports:
      - 5001:5001
    networks:
      - fastnet
    deploy:
      replicas: 3
      restart_policy:
        condition: on-failure
networks:
  fastnet:
    driver: overlay