Consider these three Layerfiles:

1. Layerfile at (repo root)/Layerfile
Layerfile
FROM vm/ubuntu:18.04
RUN apt-get update && apt-get install postgresql python3
2. Layerfile at (repo root)/web/tests/Layerfile
Layerfile
FROM /Layerfile
COPY /web .
RUN ./unittest.sh
3. Layerfile at (repo root)/web/Layerfile
Layerfile
FROM /Layerfile
COPY /web .
RUN BACKGROUND ./start-webserver.sh
EXPOSE WEBSITE localhost:8080

When built, these three Layerfiles will automatically combine into a build graph:

Here, webapp.io has searched for files named ‘Layerfile’, discovered all three of these files, and linked them based on their parents (by their FROM lines)

There are many directives which can change the Layerfile graph, see SPLIT, BUTTON, and WAIT below for some examples.