version: '3.1'

volumes:
  node_modules:
  vendor:
  dist:
services:
  app:
    build:
      context: ./
      dockerfile: dockerfile.app
    working_dir: /var/www
    volumes:
      - ./:/var/www/:delegated
      - node_modules:/var/www/node_modules
      - vendor:/var/www/backend/vendor
      - dist:/var/www/dist
      - ~/.composer/auth.json:/root/.composer/auth.json

  web:
    build:
      context: ./
      dockerfile: dockerfile.web
    working_dir: /var/www/
    volumes:
      - ./_data:/var/www/_data:delegated
      - ./public:/var/www/public:delegated
    ports:
      - 8000:80
version: '3.1'

volumes:
  v_node_modules:
  v_vendor:
  v_dist:
services:
  app:
    build:
      context: ./
      dockerfile: dockerfile.app
    working_dir: /var/www
    volumes:
      - ./:/var/www/:delegated
      - v_node_modules:/var/www/node_modules
      - v_vendor:/var/www/backend/vendor
      - v_dist:/var/www/dist
      - ~/.composer/auth.json:/root/.composer/auth.json

  web:
    build:
      context: ./
      dockerfile: dockerfile.web
    working_dir: /var/www
    volumes:
      - ./_data:/var/www/_data:delegated
      - ./public:/var/www/public:delegated
    ports:
      - 8000:80
Change volume names for docker compose
Change volume names for docker compose
