Breadcrumb
-
- Blog
- How We Built It, Part 1: Install It in Docker
In Part 0 we covered why we build on Drupal, in Docker, from Recipes. Now let's put the whole site on your machine. By the end of this post you'll have Chattanooga.Digital running at localhost:8081.
What you need first
Exactly one thing: Docker. Everything else — PHP, the database, the web server, Drush — runs inside containers, so you never install them on your laptop. If docker run hello-world works, you're ready:
docker run hello-worldOn Windows, use Docker Desktop with the WSL2 backend. On macOS or Linux, Docker Desktop or the Docker Engine both work. (We'll never ask you to run sudo or install anything on the host — that's the whole point of the container approach.)
Step 1 — Clone the repository
git clone https://github.com/TortoiseWolfe/Chattanooga-Digital.git
cd Chattanooga-DigitalStep 2 — Configure one environment file
The repo ships an example env file. Copy it; the defaults work for local development out of the box:
cp .env.example .envThe one value worth knowing about is the port the site serves on. .env.example sets it to 8081 (rather than the bare-Compose fallback of 8080 — 8081 avoids colliding with other local Drupal projects, so copying the example file is what gives you 8081):
# .env
DRUPAL_PORT=8081Step 3 — Start the containers
make upThis boots four containers, all from Wodby's Drupal images so they match what we run in production:
- mariadb — the database (MariaDB 11.4)
- php — Drupal + PHP-FPM (the
drupal-cmsimage, with a 1 GB memory limit — the calendar needs the headroom, more on that in a later post) - nginx — the web server, proxying to PHP-FPM on port 8081
- crond — the scheduler that runs Drupal cron and our weekly backup
One quirk worth naming: the Wodby image copies its own stock theme over our customized one on boot, so make up runs a small script (scripts/start.sh) that restores our theme from git and rebuilds the CSS right after the containers come up. You don't have to do anything — just know that's why make up does a little more than a bare docker compose up.
Step 4 — Install Drupal, then apply the recipes
On a fresh database the site isn't built yet — there's no content, no structure. Two commands fix that:
make install
make buildmake install runs Drupal's installer on the empty database (the drupal_cms_installer profile). make build is where the magic happens — it applies the Recipes in order:
- the upstream Byte recipe (the SaaS-style base theme + its components), then
- our chattanooga_digital recipe (the rebrand, the real content types, the pages, the calendar, the forms), then
- a
post_install.phpcleanup script that removes the stock demo content and sets our homepage as the front page.
That recipe sequence is the heart of the whole project, and it's what the next several posts unpack one layer at a time.
Step 5 — Open it
Point your browser at:
http://localhost:8081You should see the Gig City homepage. To log in as the administrator, grab a one-time login link:
docker compose exec php drush uli --uri=http://localhost:8081The commands you'll actually use
A quick reference for day-to-day work (all defined in the project's Makefile):
make up # start the stack (restores theme + rebuilds CSS)
make down # stop, keeping your data
make destroy # stop and wipe all data
make rebuild # nuke and rebuild from scratch: down -v + up + install + build
make shell # open a bash shell inside the PHP container
make logs # tail the PHP logsIf you ever want to prove the "reproducible from git" claim from Part 0, run make rebuild — it tears everything down and rebuilds the entire site from the recipes alone, no manual clicking, ending right back at the same homepage.
If something goes wrong
- Port already in use: something else is on 8081 — change
DRUPAL_PORTin.envandmake down && make up. - The root URL shows a generic "Home" page, not the Gig City hero: the Byte recipe creates some content asynchronously and can win a race against the cleanup step. Re-run it once:
docker compose exec php drush php:script /var/www/html/recipes/chattanooga_digital/post_install.php && docker compose exec php drush cr. - Docker isn't running: start Docker Desktop (or the engine) and try again —
docker run hello-worldis the quick check.
What's next
You now have the site running. In Part 2 we open up the first recipe and see what a Drupal Recipe actually is — starting with how we turned the stock theme into the Gig City brand.
More insights
Want updates from Chattanooga.Digital?
Pre-join the co-op to receive new posts, workshop schedules, and member updates.