Docker container doesn't starts after changing host directory

I have a django app which i’m dockerizing. Below is the docker-compose.yml file (Only django part is given here)

    build: .
    command: python ./webapp/
    restart: always
      - .:/code
      - ./webapp/static:/static
      - nginx_network
      - couchserver_network
      - dummyapi_flaskapp_network

when i change the name of the host directory from where it is run, i’m getting the following error : python: can't open file './webapp/': [Errno 2] No such file or directory
I have copied the host directory to image using :

RUN mkdir /code
COPY . /code/

So after renaming my host directory why python is unable to find the file as it is available in containers code directory.

I’m novice in docker and have little or no knowledge in volumes. Any help is really appreciated