Testing with Docker - manage.py not found

Here is my config.yml:

   version: 2
    working_directory: /app
      - image: bayesimpact/circleci
      - checkout
      - setup_remote_docker
      - restore_cache: # restores saved depdendency cache if Branch key template or requirements haven't changed
            - v1-{{ .Branch }}-{{ checksum "requirements/test.txt" }}
            - v1-{{ .Branch }}-dependencies        
      - run:
          name: Install dependencies
          command: |
            pip3 install virtualenv
            python3 -m venv venv
            . venv/bin/activate
            pip3 install --upgrade pip setuptools
            pip3 install -r requirements/test.txt
      - save_cache: # save dependency cache
          key: v1-{{ .Branch }}-{{ checksum "requirements/test.txt" }}
            - ./venv
      - restore_cache: # restore saved docker image cache if hasn't changed
            - v1-{{ .Branch }}
            - /caches/app.tar
      - run:
          name: Load Docker image layer cache
          command: |
            set +o pipefail
            docker load -i /caches/app.tar | true
      - run:
          name: Build and tag application Docker image
          command: |
            docker build --cache-from=app -t app -f Dockerfile.test .
            docker tag app app:testing
      - run:
          name: Save Docker image layer cache
          command: |
            mkdir -p /caches
            docker save -o /caches/app.tar app
      - save_cache: # save docker image cache
          key: v1-{{ .Branch }}-{{ epoch }}
            - /caches/app.tar
      - run:
          name: Build compose
          command: |
            docker-compose -f docker-compose.test.yml build
      - run:
          name: Run tests
          command: |
            docker-compose -f docker-compose.test.yml up
      - store_test_results:
          path: test-results
      - store_artifacts:
          path: test-results

Everything is working except I run into this error when I go to run everything:

app_1  | python: can't open file 'manage.py': [Errno 2] No such file or directory
db_1   | 2018-09-06 14:01:37.581 UTC [30] WARNING:  no usable system locales were found
app_app_1 exited with code 2

This question is metamorphosing faster than folks can reply! :smile_cat:

Does the DC volume work? I should think it does not, since your containers will be distributed by the CircleCI infrastructure over a variety of Docker hosts, and ordinary mounts do not work over remote connections. Search here for many folks, including myself, who have been bitten by that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.