services:
  back:
    image: alpine
    command: echo "Hello there!!"
    depends_on:
      - db
    networks:
      - backnet
  db:
    image: nginx:alpine
    networks:
      - backnet
    volumes:
      - data:/test
  front:
    image: nginx:alpine
    networks:
      - frontnet
  build:
    build:
      dockerfile_inline: "FROM base"
      additional_contexts:
        base: "service:build_base"
  build_base:
    build:
      dockerfile_inline: "FROM alpine"
networks:
  frontnet:
  backnet:
volumes:
  data:
