version: '2' # Live Mode # firstly remove /static_collected from .dockerignore # then follow the guide - https://docs.divio.com/en/latest/how-to/local-in-live-configuration/ services: web: build: context: '.' dockerfile: Dockerfile links: - 'db:postgres' ports: - '8000:80' volumes: - '.:/app:rw' - './data:/data:rw' command: python manage.py runserver 0.0.0.0:80 env_file: backend/.local-env frontend: build: context: '.' dockerfile: frontend.Dockerfile ports: - '8090:8090' volumes: - './frontend:/app:rw' # We want to ignore an existing frontend/node_modules # this allows a host-system yarn install and a docker based yarn work # side by side # read more at https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder - '/app/node_modules/' # remove node_modules from the volume content working_dir: /app command: yarn webpack-dev-server-in-docker db: image: postgres:10.16-alpine ports: - '5432:5432' environment: POSTGRES_DB: 'db' POSTGRES_HOST_AUTH_METHOD: trust volumes: - '.:/app:rw'