I have the following docker-compose file:
version: '3.7'
services:
  web:
    build: ./project
    command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
    volumes:
      - ./project:/usr/src/app
    ports:
      - 8002:8000
    environment:
      - ENVIRONMENT=dev
      - TESTING=0
      - DATABASE_URL=postgres://postgres:postgres@web-db:5432/web_dev # new
      - DATABASE_TEST_URL=postgres://postgres:postgres@web-db:5432/web_test # new
    depends_on: # new
      - web-db
Within ./project there is a .dockerignore that is used to ignore files within ./project. However these files are not being ignored. Does the volume take precedent and ignores .dockerignore? ./project:/usr/src/app.
How can I prevent files within ./project from being mounted onto the image?
Thanks!