Running a Project Without Waddle

How to hand a project to a colleague without Waddle: which git-ignored files to send, plain Docker commands to run it, and importing a database dump.

A Waddle project is a normal Docker Compose stack once it has been rendered: docker-compose.yml, every service’s Dockerfile, and bin/deploy/run are ordinary tracked files with concrete, already-resolved values baked in, not templates. Anyone with Docker and the git repository can build and run the project without installing Waddle at all.

What to send along with the repository

A git clone gets a colleague everything tracked in the repo. A handful of files needed for local environments are deliberately git-ignored (to stay off remotes), so they will need to be sent separately if they matter for what your colleague is doing:

File(s) Needed for a plain run? Notes
php/conf/conf.d/80-dev.ini, 90-xdebug.ini No, but nice to have Local-only PHP settings, see Dev-Only PHP Config. Skip them and the hardened defaults in 10-waddle.ini apply instead.
.env Optional Holds WADDLE_UID/WADDLE_GID and WADDLE_DB_USER/WADDLE_DB_PASSWORD. Your colleague can just as easily write their own, see WADDLE_UID and WADDLE_GID and WADDLE_DB_USER and WADDLE_DB_PASSWORD.
.config.private.json Only for bin/deploy/run Required if they want to run the same build script Waddle runs locally (see below). Not needed for plain docker compose commands.
docker-compose.override.yml No Wires into Waddle’s built-in proxy and shared Composer cache, neither of which exists on your colleague’s machine. Skip it, see below.
ssl/ Only for HTTPS Locally-issued mkcert certificates. Your colleague can add their own however they like.

Running it with plain Docker commands

docker-compose.override.yml is what normally gets merged in alongside the base file (see The Three Docker Compose Files), but it publishes Nginx on a random port meant for Waddle’s proxy, which your colleague won’t have. Point Compose at the base file and docker-compose.prod.yml instead, the same combination a remote server uses, which publishes ports straight to the host:

docker compose -f docker-compose.yml -f docker-compose.prod.yml build
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d

From there it is just Compose: docker compose ps to see what is running, docker compose logs -f php to tail a service, docker compose down to stop everything. If the local Docker daemon runs as root, export WADDLE_UID/WADDLE_GID first: see the “Running docker compose manually” section of WADDLE_UID and WADDLE_GID.

Your colleague can still add their own override config file to use whatever local proxy solution they might have.

Running the same build Waddle runs

bin/deploy/run is the actual script Waddle invokes for every build. It is a tracked file, so it is already there after cloning. Beyond starting containers it also installs Composer dependencies, initialises the database, and takes care of a few other setup steps a bare docker compose up does not.

Most of its settings resolve automatically from the tracked .config.public.json (when jq is installed), so a minimal invocation is just:

sh bin/deploy/run

For a local, non-remote run it also requires .config.private.json to be present. A few flags worth knowing about: --ssl (generate local certificates via mkcert), --install-composer, --install-phpmyadmin, and --drop-db (replace the current database with a clean one). Values that are not auto-resolved, or the auto-resolved ones, can always be overridden the same way, e.g. sh bin/deploy/run --url example.localhost.

Importing a database dump

Assuming the stack has been built at least once so the database and user already exist, importing a dump can be done like this:

docker compose exec -i db mysql \
    -u "${WADDLE_DB_USER}" \
    -p"${WADDLE_DB_PASSWORD}" \
    <db_name> < dump.sql

Replace WADDLE_DB_USER and WADDLE_DB_PASSWORD with the actual credentials for your database, or export the variables to your environment prior to running the command.