Getting a Waddle project running is one process with two parts: render, then build. Render is always a precursor to the build process, but can also be triggered manually without building.
What render does
Rendering is the templating step. Every config file in a project, Docker Compose files, Nginx
config, application config, is generated from a Handlebars template combined with your project’s
settings. Rendering turns those templates into real, concrete files on disk: the actual
docker-compose.yml, the actual Nginx vhost, and so on.
What build does
Building takes those rendered files and turns them into a working stack: resolving and installing
the right packages for your chosen distro, compiling software with your chosen version and compile
options, producing Docker images, and bringing the containers up. A build always works from
whatever is currently on disk: it needs docker-compose.yml and the rest to already exist and be
correct before it can do anything. That’s why every build starts with a render as its first step,
whether you triggered that explicitly or not.
Why render without building?
Rendering on its own gives you a checkpoint. Change a setting and render, and you get plain, readable config files you can look over before anything actually happens to the running stack, no packages installed, no images built, no containers touched. That makes it easy to see exactly what effect a settings change has and gives you the opportunity to make customizations before actually building the services.
Because rendering turns templates into concrete, tracked files, a colleague who receives the project afterwards does not need Waddle installed to build and run it themselves, see Running a Project Without Waddle.
When templates change
Templates are updated over time, and sometimes a template is removed from the repository entirely. Waddle protects any edits you have made locally, both to a project’s templates and to the files rendered from them, so an update never silently overwrites your work.
Before a build or render starts, the builder checks for these cases and asks you what to do:
- An update is available for a file you have edited. Keep your version, which skips the update for that file, or discard your edits and take the update.
- A template has been removed from the repository. Delete your copy along with its rendered file, or keep them both.
If none of your files are affected, there is nothing to answer and the builder moves straight on.